]> asedeno.scripts.mit.edu Git - cl-protobufs.git/blobdiff - api.lisp
integer encoding/decoding tests
[cl-protobufs.git] / api.lisp
index 1dde4e21458ae4b859c7ea31c1e48a97e296c514..de7fd2707ea5d1c0025974c8803a7ee610f38211 100644 (file)
--- a/api.lisp
+++ b/api.lisp
   (:documentation
    "Serialize 'object' into 'buffer' using the wire format, starting at the index
    'start' and going no farther than 'end'. 'object' is an object whose Lisp class
-   corresponds to a Protobufs message.")
+   corresponds to a Protobufs message.
+   Returns two values, the final index and the buffer.")
   (:method ((object standard-object) &optional buffer (start 0) end)
     (declare (ignore end))
     (let* ((class   (type-of object))
         (multiple-value-bind (nbuf nend)
             (serialize-object object type buffer start visited)
         (declare (ignore nbuf))
-        nend)))))
+        (values nend buffer))))))
 
 (defgeneric merge-from-array (object buffer &optional start end)
   (:documentation