Version 1.8.4: Impoved detection of long-long type for CMUCL v1.8.4
authorKevin Rosenberg <kevin@rosenberg.net>
Mon, 8 Feb 2010 17:49:58 +0000 (10:49 -0700)
committerKevin Rosenberg <kevin@rosenberg.net>
Mon, 8 Feb 2010 17:49:58 +0000 (10:49 -0700)
ChangeLog
debian/changelog
src/i18n.lisp
src/primitives.lisp

index 4fba65417b7f4e55a9c748a92d0fe0c24f91d498..e9efbda2074be3d877d1fab2d444c83fd4d9f0d1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,14 @@
+2010-02-08 Kevin Rosenberg <kevin@rosenberg.net>
+       * Version 1.8.4
+       * sql/primitives.lisp: Improved detection for
+       availability of long-long integer for CMU.
+       (Thanks to Stelian Ionescu)
+       * sql/i18n.lisp: Changes in how ignored variables
+       are declared (Stelian Ionescu)
+
 2010-02-08 Kevin Rosenberg <kevin@rosenberg.net>
        * Version 1.8.3
 2010-02-08 Kevin Rosenberg <kevin@rosenberg.net>
        * Version 1.8.3
-       * sql/strings.liap: Commit patch from Stelian Ionescu
+       * sql/strings.liap: Commit patch from 
        with fixes for recent changes with i18n as well
        as reworking how ignored variables are declared.
 
        with fixes for recent changes with i18n as well
        as reworking how ignored variables are declared.
 
index 22cb98ea4ea628128c2ce06896f6504219071898..93ea97a6d7a982139536f43bcaea2ca9a7a974ef 100644 (file)
@@ -1,3 +1,9 @@
+cl-uffi (1.8.4-1) unstable; urgency=low
+
+  * New upstream
+
+ -- Kevin M. Rosenberg <kmr@debian.org>  Mon, 08 Feb 2010 10:47:27 -0700
+
 cl-uffi (1.8.3-1) unstable; urgency=low
 
   * New upstream
 cl-uffi (1.8.3-1) unstable; urgency=low
 
   * New upstream
index 1f2bb1ad9a33286fd402304d0a0f8357e7b81458..1d6a485145458426532d4d568d079cd9bcf5d5cd 100644 (file)
@@ -60,8 +60,7 @@ encoding.")
 
 (defmacro string-to-octets (str &key (encoding *default-foreign-encoding*))
   "Converts a Lisp string to a vector of octets."
 
 (defmacro string-to-octets (str &key (encoding *default-foreign-encoding*))
   "Converts a Lisp string to a vector of octets."
-  #-(or allegro lispworks openmcl sbcl)
-  (declare (ignore encoding))
+  (declare (ignorable encoding))
   #-(or allegro lispworks openmcl sbcl)
   (map-into (make-array (length str) :element-type '(unsigned-byte 8))
             #'char-code str)
   #-(or allegro lispworks openmcl sbcl)
   (map-into (make-array (length str) :element-type '(unsigned-byte 8))
             #'char-code str)
@@ -99,8 +98,7 @@ encoding.")
 
 (defmacro octets-to-string (octets &key (encoding *default-foreign-encoding*))
   "Converts a vector of octets to a Lisp string."
 
 (defmacro octets-to-string (octets &key (encoding *default-foreign-encoding*))
   "Converts a vector of octets to a Lisp string."
-  #-(or allegro lispworks openmcl sbcl)
-  (declare (ignore encoding))
+  (declare (ignorable encoding))
   #-(or allegro lispworks openmcl sbcl)
   (let ((out (gensym "OUT-"))
         (code (gensym "CODE-")))
   #-(or allegro lispworks openmcl sbcl)
   (let ((out (gensym "OUT-"))
         (code (gensym "CODE-")))
@@ -144,6 +142,7 @@ encoding.")
 (defun foreign-encoded-octet-count (str &key (encoding *default-foreign-encoding*))
   "Returns the octets required to represent the string when passed to a ~
 foreign function."
 (defun foreign-encoded-octet-count (str &key (encoding *default-foreign-encoding*))
   "Returns the octets required to represent the string when passed to a ~
 foreign function."
+  (declare (ignorable encoding))
   ;; AllegroCL 8-bit, CCL, and Lispworks give correct value without converting
   ;; to external-format. AllegroCL 16-bit, SBCL, and CLISP requires conversion
   ;; with external-format
   ;; AllegroCL 8-bit, CCL, and Lispworks give correct value without converting
   ;; to external-format. AllegroCL 16-bit, SBCL, and CLISP requires conversion
   ;; with external-format
@@ -151,8 +150,6 @@ foreign function."
   #+(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n))
   (length (string-to-octets str :encoding encoding))
 
   #+(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n))
   (length (string-to-octets str :encoding encoding))
 
-  #-(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n))
-  (declare (ignore encoding))
   #-(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n))
   (length str)
 
   #-(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n))
   (length str)
 
index 66a0a7c7e845ecf7fb5f6993d4c25c1c83ab58f3..b7c0283b2e2a9f6d9ba0fdf729b634aa738c09d6 100644 (file)
@@ -141,7 +141,13 @@ supports takes advantage of this optimization."
       (:unsigned-short . c-call:unsigned-short)
       (:int . alien:integer) (:unsigned-int . c-call:unsigned-int)
       (:long . c-call:long) (:unsigned-long . c-call:unsigned-long)
       (:unsigned-short . c-call:unsigned-short)
       (:int . alien:integer) (:unsigned-int . c-call:unsigned-int)
       (:long . c-call:long) (:unsigned-long . c-call:unsigned-long)
+      #+#.(cl:if (cl:find-symbol (cl:string '#:long-long)
+                                 (cl:string '#:c-call))
+                 '(and) '(or))
       (:long-long . c-call:long-long)
       (:long-long . c-call:long-long)
+      #+#.(cl:if (cl:find-symbol (cl:string '#:unsigned-long-long)
+                                 (cl:string '#:c-call))
+                 '(and) '(or))
       (:unsigned-long-long . c-call:unsigned-long-long)
       (:float . c-call:float) (:double . c-call:double)
       (:array . alien:array)))
       (:unsigned-long-long . c-call:unsigned-long-long)
       (:float . c-call:float) (:double . c-call:double)
       (:array . alien:array)))