Version 1.8.2: Test suite and more functions for foreign string encoding
[uffi.git] / src / strings.lisp
index 209116428cce7e905c1210de6dc72675ab7c014e..eedc1b6e241b717df37af94ac2c94608c21ecbad 100644 (file)
@@ -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