From 4b6286e29cf106584566c6d77009f3a4b3e3ed39 Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Fri, 3 Aug 2007 15:03:08 +0200 Subject: Use tagged data on both the Lisp and C sides. darcs-hash:d32babb07560cbb4f8db5467b31a7e92534eeb0d --- libobjcl.h | 45 ++++++++++++++++++++++++++++++++++++++------- 1 file changed, 38 insertions(+), 7 deletions(-) (limited to 'libobjcl.h') diff --git a/libobjcl.h b/libobjcl.h index 0d2f055..65270ed 100644 --- a/libobjcl.h +++ b/libobjcl.h @@ -1,22 +1,53 @@ /* -*- mode: objc; coding: utf-8 -*- */ +#import "Foundation/Foundation.h" +#include + +typedef struct objcl_object +{ + char* type; + + union + { + id id_val; + SEL sel_val; + char char_val; + short short_val; + int int_val; + long long_val; + long long long_long_val; + float float_val; + double double_val; + BOOL bool_val; + char *charptr_val; + void *ptr_val; + } data; +} *OBJCL_OBJ_DATA; + + void -objcl_initialise_runtime (); +objcl_initialise_runtime (void); void -objcl_shutdown_runtime (); +objcl_shutdown_runtime (void); void * -objcl_invoke_instance_method (void *receiver, - char *const method_name, +objcl_invoke_instance_method (OBJCL_OBJ_DATA receiver, + const char *method_name, int argc, ...); void * -objcl_invoke_class_method (void *class, - char *const method_name, +objcl_invoke_class_method (OBJCL_OBJ_DATA class, + const char *method_name, int argc, ...); void * -objcl_find_class (char *const class_name); +objcl_find_class (const char *class_name); + +/* Return a null-terminated list of type information strings. + The first entry describes the type of the method's return value. */ +char ** +objcl_query_arglist_info (void *receiver, + const char *method_name); -- cgit v1.2.3