The class isa is not defined, that I am pretty sure. But did you define 
retainCount in your @interface too? I am reading this on a phone, by the way.

But from what I know in general is, that OS X uses a more modern version of 
libobjc2 than the one gnustep ships. Not a big surprise, Apple hasn’t put many 
open source updates so far, and if I am not mistaken, the version that gnustep 
relies on is even older than 10.7 Lion.

Then again, I purely work on OS X…so i could be all wrong too.

Am 29.04.2014 um 05:32 schrieb Tom Bruno <[email protected]>:

> I'm currently using libobjc2 and clang 3.4.  I was researching how NSObject 
> is implemented just learning the ins and outs (I'm very interested in the 
> memory management and such).
> 
> One of the things I've noticed is that placing variables in @implementation 
> does not work on linux but seems to work fine on osx like this (Sources at 
> end of email):
> 
> #import <objc/runtime.h>
> 
> @implementation MAObject {
>     Class isa;
>     volatile int32_t retainCount;
> }
> 
> 
> The compiler complains isa and retainCount do not exist.  I've kindof put 
> together that only OSX 64bit mode will work with this code.  Is this a 
> limitation in libobjc2 or clang on linux itself?  Is there something we can 
> do to support this new syntax?
> 
>   Tom
> 
> 
> Sources: 
> https://www.mikeash.com/pyblog/friday-qa-2013-01-25-lets-build-nsobject.html
> https://github.com/mikeash/MAObject/blob/master/MAObject.h
> https://github.com/mikeash/MAObject/blob/master/MAObject.m
> _______________________________________________
> Discuss-gnustep mailing list
> [email protected]
> https://lists.gnu.org/mailman/listinfo/discuss-gnustep

_______________________________________________
Discuss-gnustep mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/discuss-gnustep

Reply via email to