gnustep-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Slightly odd behaviour with enumerateObjectsUsingBlock:


From: David Chisnall
Subject: Re: Slightly odd behaviour with enumerateObjectsUsingBlock:
Date: Mon, 28 Feb 2011 12:12:37 +0000

On 28 Feb 2011, at 11:22, Thomas Davie wrote:

> While this seems to work right, I'm getting a pretty odd behaviour with 
> enumerateObjectsUsingBlock: producing an odd log.  Does anyone know what's up 
> here?
> 
> ~/Documents/Test$ ./obj/Test
> Calling [GSInlineArray -enumerateObjectsUsingBlock:] with incorrect 
> signature.  Method has address@hidden:8^{?=^vii^?}16, selector has 
> address@hidden:address@hidden

This is caused by the fact that you've compiled -base with a compiler without 
blocks support, but compiled your code with one that does support blocks.  

To hack around the lack of blocks support, GNUstep has some macros that lower 
the blocks stuff to pure C, but this means that the method expects a pointer to 
the blocks structure, while the caller is passing a pointer to a block.  You 
can safely ignore the warning, but if you have a compiler that supports blocks 
then it's worth using this everywhere, or you will get some strange behaviour 
if you subclass NSRegularExpression.

David

-- Send from my Jacquard Loom




reply via email to

[Prev in Thread] Current Thread [Next in Thread]