diff --git a/util.h b/util.h --- a/util.h +++ b/util.h @@ -1,64 +1,74 @@ /* Standard Pike include files. */ #include "bignum.h" #include "array.h" #include "builtin_functions.h" #include "constants.h" #include "interpret.h" #include "mapping.h" #include "multiset.h" #include "module_support.h" #include "object.h" #include "pike_macros.h" #include "pike_types.h" #include "program.h" #include "stralloc.h" #include "svalue.h" #include "threads.h" #include "version.h" #include "operators.h" #include "backend.h" #import #import "OC_NSAutoreleasePoolCollector.h" +#include #if (PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION == 1 && PIKE_BUILD_VERSION >= 12) || PIKE_MAJOR_VERSION > 7 || (PIKE_MAJOR_VERSION == 7 && PIKE_MINOR_VERSION > 1) # include "pike_error.h" #else # include "error.h" # ifndef Pike_error # define Pike_error error # endif #endif #define DEBUG 1 //#undef DEBUG #define LOG(fmt, ...) \ do { if (DEBUG) fprintf(stderr, fmt, __VA_ARGS__); } while (0) #ifndef ARG /* Get argument # _n_ */ #define ARG(_n_) Pike_sp[-((args - _n_) + 1)] #endif struct svalue * ptr_to_svalue(void * ptr, char * type); unsigned piobjc_type_size(char** type_encoding); void low_f_objc_runner_method(ffi_cif* cif, void* resp, void** args, void* userdata); id id_from_object(struct object * o); struct object * new_nsobject_object(id obj); struct svalue * get_func_by_selector(struct object * pobject, SEL aSelector); void piobjc_set_return_value(id sig, id invocation, struct svalue * svalue); id get_NSObject_from_Object(struct object *o); struct svalue * low_id_to_svalue(id obj, int prefer_native); char * get_signature_for_func(struct svalue * func, SEL selector, struct program * prog); id unwrap_objc_object(struct object * o); char * pike_signature_from_nsmethodsignature(id nssig, int * lenptr); struct object * new_method_runner(struct object * obj, SEL selector); int get_num_pointer_return_arguments(struct objc_method * nssig); void push_complex_result(void * result, int len, char * signature); void make_complex_object(void * result, int len, char * signature); void push_complex_result(void * result, int len, char * signature); void make_complex_object(void * result, int len, char * signature); +int push_objc_pointer_return_type(struct objc_method * method, void ** margs); +void * svalue_to_ptr(struct svalue * sval, char * type); +BOOL isNSNil(struct svalue * sv); +int push_objc_types(NSMethodSignature* sig, NSInvocation* invocation); +struct svalue * get_class_func_by_selector(struct program * prog, SEL aSelector); +BOOL has_objc_class_method(id obj, SEL aSelector); +char * get_signature_for_class_func(struct svalue * func, SEL selector, struct program * prog); +BOOL has_objc_method(id obj, SEL aSelector); +int push_objc_type(char * type, void * buf);