]> asedeno.scripts.mit.edu Git - cl-protobufs.git/commitdiff
Commit changes merged from trunk
authorScott McKay <swm@google.com>
Thu, 29 Mar 2012 17:44:08 +0000 (17:44 +0000)
committerScott McKay <swm@google.com>
Thu, 29 Mar 2012 17:44:08 +0000 (17:44 +0000)
git-svn-id: http://svn.internal.itasoftware.com/svn/ita/branches/qres/swm/borgify-1/qres/lisp/quux/protobufs@536623 f8382938-511b-0410-9cdd-bb47b084005c

wire-format.lisp

index fec6cd281959ced4884a491816edca73b1f7669e..f355a3c0390641e95f75f166294e9a72a76571d7 100644 (file)
          (encode-double val buffer idx))
         ;; A few of our homegrown types
         ((:symbol)
+         ;; Note that this is consy, avoid it if possible
          (let ((val (format nil "~A:~A" (package-name (symbol-package val)) (symbol-name val))))
-           ;; Call 'string' in case we are trying to serialize a symbol name
            (encode-octets (babel:string-to-octets val :encoding :utf-8) buffer idx)))
         ((:date :time :datetime :timestamp)
          (encode-uint64 val buffer idx))))))
        (decode-double buffer index))
       ;; A few of our homegrown types
       ((:symbol)
+       ;; Note that this is consy, avoid it if possible
        (multiple-value-bind (val idx)
            (decode-octets buffer index)
          (let* ((val   (babel:octets-to-string val :encoding :utf-8))