[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: error with runtime includes
From: |
Fred Kiefer |
Subject: |
Re: error with runtime includes |
Date: |
Wed, 25 Jan 2012 11:05:28 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:9.0) Gecko/20111220 Thunderbird/9.0 |
On 25.01.2012 09:52, Riccardo Mottola wrote:
On 01/24/2012 10:53 PM, Fred Kiefer wrote:
I think the best way forward is to just include runtime.h here and
only use class_getInstanceSize(). That wont work with older
versions of Objective-C without base support, but you will need
GNUstep base anyway and there is no reason to use a version of base
without the Objective-C 2 compatibility layer. In your specific
case you are already using gcc 4.6 which provides all the necessary
include files by itself.
I moved the import of those runtime headers into the apple-specific
#ifdef. This keeps gcc 4.6 happy. I will try on other versions.
Foundation.h gets imported, should work according to David.
I don't think that you need these includes on Apple either. And for
newer Apple runtimes you should definitely move to use runtime.h, if you
want to include something.
I see only class_getInstanceSize(), do you see something else?
Yes, I see ((struct objc_class *) self)->instance_size and this
shouldn't be used anywhere.
But I also think that the super dealloc call in -dealloc is wrong. It
would be better if the whole object pool code gets never used.
This way the application compiles and starts up again (but has other
problems, other mail will follow).