From: Nikodemus Siivola Date: Wed, 2 Mar 2011 09:30:09 +0000 (+0000) Subject: 1.0.46.18: terser C-STRING unparsing X-Git-Url: http://repo.macrolet.net/gitweb/?a=commitdiff_plain;h=4078d29d83e45a0b059ca5a71877ec36a4174a01;p=sbcl.git 1.0.46.18: terser C-STRING unparsing Omit parts with default values from the unparsing: just (C-STRING :EXTERNAL-FORMAT :DEFAULT :ELEMENT-TYPE CHARACTER) becomes C-STRING, and (C-STRING :EXTERNAL-FORMAT :UTF-8 :ELEMENT-TYPE CHARACTER) becomes (C-STRING :EXTERNAL-FORMAT :UTF-8), etc. --- diff --git a/src/code/host-c-call.lisp b/src/code/host-c-call.lisp index d688879..e4187db 100644 --- a/src/code/host-c-call.lisp +++ b/src/code/host-c-call.lisp @@ -30,9 +30,16 @@ external-format))) (define-alien-type-method (c-string :unparse) (type) - (list 'c-string - :external-format (alien-c-string-type-external-format type) - :element-type (alien-c-string-type-element-type type))) + (let* ((external-format (alien-c-string-type-external-format type)) + (element-type (alien-c-string-type-element-type type)) + (tail + (append (unless (eq :default external-format) + (list :external-format external-format)) + (unless (eq 'character element-type) + (list :element-type element-type))) )) + (if tail + (cons 'c-string tail) + 'c-string))) (define-alien-type-method (c-string :lisp-rep) (type) (declare (ignore type)) diff --git a/version.lisp-expr b/version.lisp-expr index 45ce16b..fbac88c 100644 --- a/version.lisp-expr +++ b/version.lisp-expr @@ -20,4 +20,4 @@ ;;; checkins which aren't released. (And occasionally for internal ;;; versions, especially for internal versions off the main CVS ;;; branch, it gets hairier, e.g. "0.pre7.14.flaky4.13".) -"1.0.46.17" +"1.0.46.18"