Weakly-Linked Symbols
Weakly-Linked Symbols
- Subject: Weakly-Linked Symbols
- From: "Dave Keck" <email@hidden>
- Date: Tue, 28 Oct 2008 18:39:54 -1000
Hey everyone,
This is the most appropriate list I could find for this question
pertaining to building weakly-linked libraries and frameworks.
Here's a quote from
http://developer.apple.com/documentation/MacOSX/Conceptual/BPFrameworks/Concepts/WeakLinking.html
"Note: When checking for the existence of a symbol, you must
explicitly compare it to NULL or nil in your code. You cannot use the
negation operator ( ! ) to negate the address of the symbol."
I was simply wondering why this is - what's different between this:
if ( !mySymbol )
and this:
if ( mySymbol == NULL )
to check whether the symbol exists or not? My understanding of C seems
to suggest that comparing something with NULL would be precisely the
same thing as comparing it with 0 (overlooking the (void *) cast).
Thanks for any insight!
David
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden