Skip to content

Commit

Permalink
CGImageRefs are now treated as ids.
Browse files Browse the repository at this point in the history
  • Loading branch information
Tim Burks committed Nov 10, 2010
1 parent bdf87c9 commit 89ad15d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions objc/bridge.m
Expand Up @@ -901,6 +901,12 @@ id get_nu_value_from_objc_value(void *objc_value, const char *typeString)
[reference setPointer:*((id**)objc_value)];
return reference;
}
// Certain pointer types are essentially just ids.
// CGImageRef is one. As we find others, we can add them here.
else if (!strcmp(typeString, "^{CGImage=}")) {
id result = *((id *)objc_value);
return result ? result : (id)[NSNull null];
}
else {
if (*((unsigned long *)objc_value) == 0)
return [NSNull null];
Expand Down

0 comments on commit 89ad15d

Please sign in to comment.