[cfe-dev] [PATCH] add unconditional support for @encode block descriptor string
csdavec at swan.ac.uk
Fri Feb 19 16:12:25 PST 2010
On 19 Feb 2010, at 19:31, Fariborz Jahanian wrote:
> We can't change the encoding. Encoding for block is '@' for block and '?' for function type. Similar to function pointer type; except that
> '^?' is used.
1) ? actually signifies 'unknown type', not 'function type'
2) This is completely irrelevant to what I said. I was talking about the return from doing something like:
typedef void(^foo)(id, void*); @encode(foo);
This currently returns "@?" if foo is any block type, rather than the type encoding that we are storing with the block. To get the block type encoding, we need to look up the type of a template block at run time, which prevents some optimisations when you test that two type encodings match, because neither is known at compile time (even though one actually is).
-- Sent from my PDP-11
More information about the cfe-dev