From b7b5bd2d3ca7f3e339512582179e355d4df71293 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Sun, 3 Feb 2008 22:35:36 +0100 Subject: Objective-C layer: Add slot handling functions. darcs-hash:b4ec2fb1229c4eb9f3201e378a2d3e6e5fc6b872 --- Objective-C/libobjcl.h | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'Objective-C/libobjcl.h') diff --git a/Objective-C/libobjcl.h b/Objective-C/libobjcl.h index 968cf14..09b08ab 100644 --- a/Objective-C/libobjcl.h +++ b/Objective-C/libobjcl.h @@ -22,6 +22,10 @@ #include "../config.h" +#import "PyObjC/pyobjc.h" +#import "PyObjC/objc_support.h" +#import "PyObjC/objc-runtime-compat.h" + #ifdef USE_LIBFFI #ifdef HAVE_FFI_H #include @@ -33,6 +37,12 @@ #endif #endif +#ifdef __NEXT_RUNTIME__ +typedef Ivar IVAR_T; +#else +typedef struct objc_ivar *IVAR_T; +#endif + extern NSException *objcl_oom_exception; @@ -118,3 +128,20 @@ objcl_sizeof_return_type (const char *typespec); long objcl_alignof_type (const char *typespec); + +void +objcl_set_slot_value (id obj, const char *ivar_name, void *value); + +void * +objcl_slot_value (id obj, const char *ivar_name); + +/* The following function returns a freshly consed array that the caller + must deallocate. */ +IVAR_T * +objcl_class_direct_slots (Class class, unsigned int *count, unsigned int *element_size); + +const char * +objcl_slot_name (IVAR_T ivar); + +const char * +objcl_slot_type (IVAR_T ivar); -- cgit v1.2.3