gnustep-dev
[Top][All Lists]
Advanced

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

Re: [patch] corebase/pyobjc


From: Stefan Bidi
Subject: Re: [patch] corebase/pyobjc
Date: Mon, 29 Aug 2011 21:13:37 -0500

I still don't quite understand what is going on here.  CFStringInitialize() doesn't do anything accept call objc_getClass("NSCFString") (it's actually done by CFRuntimeBridgeClass).  According to the Apple docs this is safe because objc_getClass will call the class handler (not 100% what that really mean, but I thought it implied the class would get loaded if it belonged to the same framework) and try finding the class again afterward.

Also, according to that doc, it isn't guaranteed that NSCFString is loaded before NSCFType, but how is this a problem?  CFString (and NSCFString) shouldn't be getting called during initialization anyway.

I'm just trying to understand what your problem is and what is causing it.

On Mon, Aug 29, 2011 at 8:16 PM, Matt Rice <address@hidden> wrote:
On Mon, Aug 29, 2011 at 5:17 PM, Stefan Bidi <address@hidden> wrote:
> I wasn't really following the previous string of e-mails (perhaps I should
> have).  Can you give me an overview of what the problem is and why
> initializing CF in [NSCFType+load] doesn't work?

http://gcc.gnu.org/onlinedocs/gcc/What-you-can-and-what-you-cannot-do-in-_002bload.html

e.g. NSCFType is not a subclass of NSCFString nor implemented in the
same file, thus the call to CFStringInitialize should be moved to
NSCFString +load.

that documentation doesn't seem to say you can't call objc_getClass(),
apparently you cannot... so the NSNull I added is broken also, its
just not crashing.
it's of the "In particular, the following things, even if they can
work in a particular case, are not guaranteed:" variety.

those were the 2 things that popped out at me looking through
CF*Initialize but i'm not all that familiar with the library.


reply via email to

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