Permalink
Browse files

Insert WITH-STANDARD-IO-SYNTAX between INTERN and FORMAT.

In general, (intern (format "~a..." 'sym ...)) is incorrect because
FORMAT writes symbols according to *print-case*, which may differ from
the case of symbol names (uppercase in the customary readtable).
When *PRINT-CASE* is :DOWNCASE, lower case symbols such as |sym| get
interned.
  • Loading branch information...
1 parent d68fd55 commit c6585260e90278de3ce0dc8952fbe3c09b9f561d @orivej orivej committed with Aug 29, 2012
Showing with 5 additions and 3 deletions.
  1. +4 −2 cl-postgres/communicate.lisp
  2. +1 −1 postmodern/prepare.lisp
@@ -6,9 +6,11 @@
;; some macros that use them create names this way.
(eval-when (:compile-toplevel :load-toplevel :execute)
(defun integer-reader-name (bytes signed)
- (intern (format nil "~a~a~a~a" '#:read- (if signed "" '#:u) '#:int bytes)))
+ (intern (with-standard-io-syntax
+ (format nil "~a~a~a~a" '#:read- (if signed "" '#:u) '#:int bytes))))
(defun integer-writer-name (bytes signed)
- (intern (format nil "~a~a~a~a" '#:write- (if signed "" '#:u) '#:int bytes))))
+ (intern (with-standard-io-syntax
+ (format nil "~a~a~a~a" '#:write- (if signed "" '#:u) '#:int bytes)))))
(defmacro integer-reader (bytes)
"Create a function to read integers from a binary stream."
View
@@ -11,7 +11,7 @@
(defun next-statement-id ()
"Provide unique statement names."
(incf next-id)
- (intern (format nil "STATEMENT-~A" next-id) :keyword)))
+ (intern (with-standard-io-syntax (format nil "STATEMENT-~A" next-id)) :keyword)))
(defun generate-prepared (function-form query format)
"Helper macro for the following two functions."

0 comments on commit c658526

Please sign in to comment.