X-Git-Url: http://git.kpe.io/?p=uffi.git;a=blobdiff_plain;f=src%2Fi18n.lisp;h=1d6a485145458426532d4d568d079cd9bcf5d5cd;hp=1f2bb1ad9a33286fd402304d0a0f8357e7b81458;hb=4b3d6378e1c9ea38fa2eeced4f9f2dfbe41e3a64;hpb=21460adf8bdfbbe46b657f9d8c57109c0ded790f diff --git a/src/i18n.lisp b/src/i18n.lisp index 1f2bb1a..1d6a485 100644 --- a/src/i18n.lisp +++ b/src/i18n.lisp @@ -60,8 +60,7 @@ encoding.") (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) @@ -99,8 +98,7 @@ encoding.") (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-"))) @@ -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." + (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 @@ -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)) - (declare (ignore encoding)) #-(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n)) (length str)