Current-Users archive

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

Re: __weak definition and problems with Obj-C



Hi,

christos%astron.com@localhost (Christos Zoulas) wrote:
I sympathize about __weak, but I don't understand what is it trying to
do here because I don't have the context in GSConfig.h. It looks to
me like it is part of a nested cpp if statement, which perhaps is going
the wrong way because it does not know how to handle NetBSD or it fails
to detect NetBSD. Nevertheless, defining symbols in the __ space should
be protected or avoided.

Don't blame NetBSD though, because these are system headers...

after some research, I carry the proof. __weak (and __strong) is an Objective-C keyword instroduced when Apple introduced garbage collection. Thus the change from 6.1.5 header to current header essentially breaks objective-c.

Here it is not a matter of "GNUstep" or not, that part is runtime suppport.

Check here:
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/ProgrammingWithObjectiveC/EncapsulatingData/EncapsulatingData.html


I voice thus for changing NetBSD system header or you mine support for a language.

What was wrong with the harmless?

#define __weak_reference(sym)   __attribute__((__weakref__(#sym)))

Riccardo





Home | Main Index | Thread Index | Old Index