You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The GNUstep libobjc2 API does not match Apple documentation. Some of these mismatches cause problems building code that links against the Apple runtime, e.g. Swift.
The lack of objc_constructInstance and objc_destructInstance is discussed in #121.
Other than this, the signature differences in objc_lookUpClass and objc_getRequiredClass are the most problematic (Class vs. id).
Protocol * _Nonnull * class_copyProtocolList(Class cls, unsigned int *outCount);
Protocol *__unsafe_unretained* class_copyProtocolList(Class cls, unsigned int *outCount);
id objc_constructInstance(Class cls, void *bytes);
Unimplemented and necessary
void * objc_destructInstance(id obj);
Unimplemented and necessary
id object_copy(id obj, size_t size);
Commented out because of legacy GNU runtime lacking size parameter
Class objc_lookUpClass(const char *name);
id objc_lookUpClass(const char *name);
Class objc_getRequiredClass(const char *name);
id objc_getRequiredClass(const char *name);
Protocol * _Nonnull * objc_copyProtocolList(unsigned int *outCount);
Protocol ***__unsafe_unretained***objc_copyProtocolList(unsigned int *outCount);
The following methods are defined in a header not included from <objc/runtime.h>, but are part of the Runtime API:
OBJC_PUBLIC id objc_loadWeak(id* object);
OBJC_PUBLIC id objc_storeWeak(id *addr, id obj);
The following methods have new annotations:
objc_property_t _Nonnull * class_copyPropertyList(Class cls, unsigned int *outCount);
Method _Nonnull * class_copyMethodList(Class cls, unsigned int *outCount);
Ivar object_getInstanceVariable(id obj, const char *name, void * _Nullable *outValue);
int objc_getClassList(Class _Nonnull *buffer, int bufferCount);
Class _Nonnull * objc_copyClassList(unsigned int *outCount);
objc_property_t _Nonnull * protocol_copyPropertyList(Protocol *proto, unsigned int *outCount);
id objc_loadWeak(id _Nullable *location);
id objc_storeWeak(id _Nullable *location, id obj);
The following methods are unimplemented and probably should be implemented at some point:
struct objc_method_description * method_getDescription(Method m);
The following methods are unimplemented but should not be necessary:
Class objc_getFutureClass(const char *name);
void objc_setFutureClass (Class cls, const char *name);
Class objc_duplicateClass(Class original, const char *name, size_t extraBytes);
void objc_enumerationMutation(id obj);
void objc_setEnumerationMutationHandler(void (*handler)(id));
The text was updated successfully, but these errors were encountered:
Most of the GCC APIs are guarded by an off by default flag, we can remove them at some point. The construct and destruct instance are probably not possible to support because it relies on a runtime that doesn’t add an object header.
The GNUstep libobjc2 API does not match Apple documentation. Some of these mismatches cause problems building code that links against the Apple runtime, e.g. Swift.
The lack of objc_constructInstance and objc_destructInstance is discussed in #121.
Other than this, the signature differences in
objc_lookUpClass
andobjc_getRequiredClass
are the most problematic (Class
vs.id
).The following methods are defined in a header not included from <objc/runtime.h>, but are part of the Runtime API:
OBJC_PUBLIC id objc_loadWeak(id* object);
OBJC_PUBLIC id objc_storeWeak(id *addr, id obj);
The following methods have new annotations:
objc_property_t _Nonnull * class_copyPropertyList(Class cls, unsigned int *outCount);
Method _Nonnull * class_copyMethodList(Class cls, unsigned int *outCount);
Ivar object_getInstanceVariable(id obj, const char *name, void * _Nullable *outValue);
int objc_getClassList(Class _Nonnull *buffer, int bufferCount);
Class _Nonnull * objc_copyClassList(unsigned int *outCount);
objc_property_t _Nonnull * protocol_copyPropertyList(Protocol *proto, unsigned int *outCount);
id objc_loadWeak(id _Nullable *location);
id objc_storeWeak(id _Nullable *location, id obj);
The following methods are unimplemented and probably should be implemented at some point:
struct objc_method_description * method_getDescription(Method m);
The following methods are unimplemented but should not be necessary:
Class objc_getFutureClass(const char *name);
void objc_setFutureClass (Class cls, const char *name);
Class objc_duplicateClass(Class original, const char *name, size_t extraBytes);
void objc_enumerationMutation(id obj);
void objc_setEnumerationMutationHandler(void (*handler)(id));
The text was updated successfully, but these errors were encountered: