[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: random gnustep/objc questions
From: |
Richard Frith-Macdonald |
Subject: |
Re: random gnustep/objc questions |
Date: |
Wed, 5 Dec 2001 07:34:55 +0000 |
On Wednesday, December 5, 2001, at 02:06 AM, Jay McCarthy wrote:
i am working on porting something and i have some questions:
1) are functions from objc/objc-api.h made by GNUstep? I know they are
present in libobjc - but the version of gcc i use (gcc 3) also has this
header so i do not install libobjc. If they are owned by GNUstep - are
there plans to implement methods like:
class_nextMethodList
objc_getClasses
etc
No they aren't made by GNUstep.
if this is not the case then do any GNUstep/Objc coders know of ways to
do similiar things?
Both versions of the objc runtime have similar capabilities.
Apple say you shouldn't use the objc runtime stuff directly in MacOS-X
I think we really say the same, there has been some work done to create
a set of macros and functions to hide runtime differences, but it's far
from complete ... what there is is in NSObjCRuntime.[hm] in the GNUstep
base library.
2) other functions which are similiar to the above are those functions
in objc/HashTable.h that are not implemented but used in some apps i'm
porting:
NSInitHashState
NSNextHashState
my question is the same for these but I also have another side question
to go along with it, is GNUstep's NSHashTable the same (or more) than
the NSHashTable of objc/HashTable.h ?
I think NSHashTable has a superset of the functionality in the runtime.
In general, you shouldn't use runtime functions or depend on runtime data
structures unless you really, really have to - they are liable to change
without notice. So you should rewrite to use OpenStep functions where
possible.
However, if you really *do* need to use the runtime directly, the
GNUstep guile and java interface libraries probably provide examples
of using the gnu runtime to do anything you might want.