X-Git-Url: http://git.kpe.io/?p=uffi.git;a=blobdiff_plain;f=src%2Fstrings.lisp;fp=src%2Fstrings.lisp;h=eedc1b6e241b717df37af94ac2c94608c21ecbad;hp=209116428cce7e905c1210de6dc72675ab7c014e;hb=a3db800bfa385ae39d729ef0eb8f08a78ceaccdb;hpb=3044928889785c0160fd021a51fbf86ad691a3a9 diff --git a/src/strings.lisp b/src/strings.lisp index 2091164..eedc1b6 100644 --- a/src/strings.lisp +++ b/src/strings.lisp @@ -208,9 +208,9 @@ that LW/CMU automatically converts strings from c-calls." (defmacro convert-to-foreign-string (obj &optional foreign-encoding) #+allegro (let ((stored (gensym "STR-")) - (ef (gensym "EF-")) - (nef (gensym "NEF-"))) - `(let ((,stored ,obj) + (fe (gensym "FE-")) + (ife (gensym "IFE-"))) + `(let* ((,stored ,obj) (,fe (or foreign-encoding *default-foreign-encoding*)) (,ife (when ,fe (implementation-foreign-encoding ,fe)))) @@ -240,7 +240,7 @@ that LW/CMU automatically converts strings from c-calls." #+(or cmu scl sbcl digitool openmcl) `(%convert-to-foreign-string ,obj (implementation-foreign-encoding - (or ,foreign-encoding *default-foreign-encoding))) + (or ,foreign-encoding *default-foreign-encoding*))) ) @@ -332,8 +332,7 @@ that LW/CMU automatically converts strings from c-calls." (declare (ignore null-terminated-p)) #+(or openmcl digitool) (let ((stored-obj (gensym "STR-")) - (fe (gensym "FE-")) - (ife (gensym "IFE-"))) + (fe (gensym "FE-"))) `(let ((,stored-obj ,obj)) (if (ccl:%null-ptr-p ,stored-obj) nil