r9741: 8 Jul 2004 Kevin Rosenberg <kevin@rosenberg.net>
[clsql.git] / sql / fdml.lisp
index ee9a37db3ea0a343eb0b1ba33e8fbe49b8a4a955..470ad37d195b7f2df46feea74ca724b2ee54f3a4 100644 (file)
@@ -200,7 +200,7 @@ are nil and AV-PAIRS is an alist of (attribute value) pairs."
            (type (simple-array * (*)) str))
   (let ((len (length str)))
     (declare (type fixnum len))
-    (cond ((= len 0)
+    (cond ((zerop len)
            +empty-string+)
           ((and (null (position #\' str))
                 (null (position #\\ str)))
@@ -210,13 +210,14 @@ are nil and AV-PAIRS is an alist of (attribute value) pairs."
              (do* ((i 0 (incf i))
                    (j 1 (incf j)))
                   ((= i len) (subseq buf 0 (1+ j)))
-               (declare (type integer i j))
+               (declare (type fixnum i j))
                (let ((char (aref str i)))
-                 (cond ((eql char #\')
-                        (setf (aref buf j) #\\)
+                (declare (character char))
+                 (cond ((char= char #\')
+                        (setf (aref buf j) #\')
                         (incf j)
                         (setf (aref buf j) #\'))
-                       ((eql char #\\)
+                       ((char= char #\\)
                         (setf (aref buf j) #\\)
                         (incf j)
                         (setf (aref buf j) #\\))