|
|
|
@ -39,12 +39,17 @@
|
|
|
|
static void *_HeapBlockByRef = (void*)1;
|
|
|
|
static void *_HeapBlockByRef = (void*)1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
PUBLIC _Bool _Block_has_signature(id b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
const struct Block_layout *block = (struct Block_layout*)b;
|
|
|
|
|
|
|
|
return ((NULL != block) && (block->flags & BLOCK_HAS_SIGNATURE));
|
|
|
|
|
|
|
|
}
|
|
|
|
/**
|
|
|
|
/**
|
|
|
|
* Returns the Objective-C type encoding for the block.
|
|
|
|
* Returns the Objective-C type encoding for the block.
|
|
|
|
*/
|
|
|
|
*/
|
|
|
|
PUBLIC const char *block_getType_np(const void *b)
|
|
|
|
PUBLIC const char * _Block_signature(id b)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
const struct Block_layout *block = b;
|
|
|
|
const struct Block_layout *block = (struct Block_layout*)b;
|
|
|
|
if ((NULL == block) || !(block->flags & BLOCK_HAS_SIGNATURE))
|
|
|
|
if ((NULL == block) || !(block->flags & BLOCK_HAS_SIGNATURE))
|
|
|
|
{
|
|
|
|
{
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
@ -55,6 +60,10 @@ PUBLIC const char *block_getType_np(const void *b)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return block->descriptor->encoding;
|
|
|
|
return block->descriptor->encoding;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
PUBLIC const char *block_getType_np(const void *b)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
return _Block_signature(b);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static int increment24(int *ref)
|
|
|
|
static int increment24(int *ref)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|