]> asedeno.scripts.mit.edu Git - cl-protobufs.git/commitdiff
Merge branch 'portability'
authorAlejandro R Sedeño <asedeno@google.com>
Wed, 6 Mar 2013 05:32:06 +0000 (00:32 -0500)
committerAlejandro R Sedeño <asedeno@google.com>
Wed, 6 Mar 2013 05:32:06 +0000 (00:32 -0500)
cl-protobufs.asd
define-proto.lisp
utilities.lisp

index 97b846b7f672e442c09beb7560fd3251b85290fc..7aaf3bf305508eba05b7da0776cb87eae185976d 100644 (file)
@@ -19,7 +19,7 @@
   :maintainer '("Scott McKay")
   :description      "Protobufs for Common Lisp"
   :long-description "Protobufs for Common Lisp"
-  :depends-on (:closer-mop :babel)
+  :depends-on (:closer-mop :babel :trivial-garbage)
   :serial t
   :components
     ((:module "packages"
index 9f6cca4055839cab758df66ff4c1c154c82d1648..163cd8e6e66312b74aaeae4d254423c1bd8183b1 100644 (file)
                                      (intern (format nil "~A-~A" 'set reader) *protobuf-package*)))
                          (default (getf inits :initform)))
                     (collect-form `(without-redefinition-warnings ()
-                                     (let ((,stable #+ccl  (make-hash-table :test #'eq :weak t)
-                                                    #+sbcl (make-hash-table :test #'eq :weakness :value)))
+                                     (let ((,stable (tg:make-weak-hash-table :weakness :value :test #'eq)))
                                        ,@(and reader `((defmethod ,reader ((object ,type))
                                                          (gethash object ,stable ,default))))
                                        ,@(and writer `((defmethod ,writer ((object ,type) value)
                  ;; will result in harmless redefinitions, so squelch the warnings
                  ;;--- Maybe these methods need to be defined in 'define-message'?
                  (collect-form `(without-redefinition-warnings ()
-                                  (let ((,stable #+ccl  (make-hash-table :test #'eq :weak t)
-                                                 #+sbcl (make-hash-table :test #'eq :weakness :value)))
+                                  (let ((,stable (tg:make-weak-hash-table :weakness :value :test #'eq)))
                                     ,@(and reader `((defmethod ,reader ((object ,type))
                                                       (gethash object ,stable ,default))))
                                     ,@(and writer `((defmethod ,writer ((object ,type) value)
               ;; response as an application object.
               (collect-form `(defgeneric ,client-fn (,vchannel ,vrequest &key ,vcallback)
                                ,@(and documentation `((:documentation ,documentation)))
-                               #-sbcl (declare (values ,output-type))
+                               #+(or ccl)
+                               (declare (values ,output-type))
                                (:method (,vchannel (,vrequest ,input-type) &key ,vcallback)
                                  (declare (ignorable ,vchannel ,vcallback))
                                  (let ((call (and *rpc-package* *rpc-call-function*)))
               ;; The RPC code provides the channel classes and does (de)serialization, etc
               (collect-form `(defgeneric ,server-fn (,vchannel ,vrequest)
                                ,@(and documentation `((:documentation ,documentation)))
-                               #-sbcl (declare (values ,output-type))))))))
+                               #+(or ccl)
+                               (declare (values ,output-type))))))))
       `(progn
          define-service
          ,service
index adf9139a55b0f6bb4af4212a01c159a08bca235d..d524371058ec9b1d5901e7fa749bdbbd701eda01 100644 (file)
 
 ;; Type expansion
 (defun type-expand (type)
+  #+(or abcl xcl) (system::expand-deftype type)
   #+allegro (excl:normalize-type type :default type)
   #+ccl (ccl::type-expand type)
   #+clisp (ext:type-expand type)
   #+cmu (kernel:type-expand type)
+  #+(or ecl mkcl) (si::expand-deftype type)
   #+lispworks (type:expand-user-type type)
   #+sbcl (sb-ext:typexpand type)
-  #-(or allegro ccl clisp cmu lispworks sbcl) type)
+  #-(or abcl allegro ccl clisp cmu ecl lispworks mkcl sbcl xcl) type)
 
 
 ;;; Code generation utilities