summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 17:08:25 +0100
committerMatthias Benkard <code@mail.matthias.benkard.de>2008-02-17 17:08:25 +0100
commita3ef85dc301454c108ba5e97a4ff5cf0a24e8acb (patch)
treed1cd5dee490289944905805e4d3f9f5fe384029c
parentb0ec6dfd9f29ca0c6e5d1867c87ee78b1cc0e1eb (diff)
Minor cleanups.
darcs-hash:57b1ce2455369fba915bd730fe63eacb3e169a25
-rw-r--r--Lisp/libobjcl.lisp16
-rw-r--r--Lisp/memory-management.lisp3
-rw-r--r--Objective-C/libobjcl.m10
3 files changed, 21 insertions, 8 deletions
diff --git a/Lisp/libobjcl.lisp b/Lisp/libobjcl.lisp
index 47c39a9..e9e5f3c 100644
--- a/Lisp/libobjcl.lisp
+++ b/Lisp/libobjcl.lisp
@@ -763,13 +763,15 @@ separating parts by hyphens works nicely in all of the `:INVERT`,
(loop for element in list
for i from 0
do (setf (mem-aref array type i) element))))
- (loop for (array . list) in (list (cons %protocol-names protocol-names)
- (cons %ivar-names ivar-names)
- (cons %ivar-typestrings ivar-typestrings))
- do (fill-foreign-array-from-list array
- (mapcar #'allocate-temporary-string
- list)
- :pointer)))
+ (loop for (array . list)
+ in (list (cons %protocol-names protocol-names)
+ (cons %ivar-names ivar-names)
+ (cons %ivar-typestrings ivar-typestrings))
+ do (fill-foreign-array-from-list
+ array
+ (mapcar #'allocate-temporary-string
+ list)
+ :pointer)))
(%objcl-create-class class-name
(pointer-to superclass)
(length protocol-names)
diff --git a/Lisp/memory-management.lisp b/Lisp/memory-management.lisp
index b625b8f..d603092 100644
--- a/Lisp/memory-management.lisp
+++ b/Lisp/memory-management.lisp
@@ -75,7 +75,8 @@
;; By the way, is using the return value of SETF considered bad style?
(let* ((constructor (case class
((exception) #'make-condition)
- (otherwise #'make-instance)))(*in-make-pointer-wrapper-p* t)
+ (otherwise #'make-instance)))
+ (*in-make-pointer-wrapper-p* t)
(new-wrapper (apply constructor
;; We do not create direct instances of ID
;; anymore. Instead, we look for the
diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m
index 43190f6..7b69d46 100644
--- a/Objective-C/libobjcl.m
+++ b/Objective-C/libobjcl.m
@@ -734,6 +734,14 @@ objcl_create_class (const char *class_name,
argv[3 + 2*i + 1] = (void *) &ivar_typespecs[i];
}
+ TRACE (@"Arg 0: %s", *((char **) argv[0]));
+ TRACE (@"Arg 1: %s", *((char **) argv[1]));
+ TRACE (@"Arg 2: %d", *((int *) argv[2]));
+ for (i = 3; i < 3 + 2*ivar_number; i++)
+ {
+ TRACE (@"Arg %d: %s", i, *((char **) argv[i]));
+ }
+
status = ffi_prep_cif (&cif, FFI_DEFAULT_ABI, ivar_number*2 + 3, &ffi_type_uchar, arg_types);
if (status != FFI_OK)
{
@@ -742,7 +750,9 @@ objcl_create_class (const char *class_name,
userInfo: nil] raise];
}
+ TRACE (@"ObjcUtilities_new_class");
ffi_call (&cif, FFI_FN (ObjcUtilities_new_class), &return_value, argv);
+ TRACE (@"ObjcUtilities_new_class end");
NSString *ns_class_name = [NSString stringWithUTF8String: class_name];
[method_lists setObject: