Permalink
Browse files

make-NSString takes nil or string

  • Loading branch information...
1 parent a3d6dfc commit de268ff93fdb2b1155651764d97337be06933e48 @TerjeNorderhaug TerjeNorderhaug committed Apr 11, 2011
Showing with 6 additions and 3 deletions.
  1. +6 −3 eclshell/eclffi.lisp
@@ -64,9 +64,12 @@
[pool release];"))
(defun make-NSString (string)
- (c-fficall ((string :cstring))
- :pointer-void
- "[NSString stringWithCString: #0]" :one-liner t))
+ (if string
+ (c-fficall ((string :cstring))
+ :pointer-void
+ "[NSString stringWithCString: #0]" :one-liner t)
+ (c-fficall () :pointer-void
+ "nil" :one-liner t)))
(defun alloc (class-name &key init)
(let ((obj (c-fficall ((class-name :cstring))

0 comments on commit de268ff

Please sign in to comment.