Fix CCL and allow ASDF
Thu May 28 15:43:36 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix CCL and allow ASDF
diff -rN -u old-smoke/src/class-map.lisp new-smoke/src/class-map.lisp
--- old-smoke/src/class-map.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/class-map.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -25,7 +25,6 @@
(defun add-id (smoke-class class)
"Associates the CLOS class CLASS with SMOKE-CLASS."
- (declare (smoke-class smoke-class))
(setf (gethash (id smoke-class)
(id-class-map (smoke smoke-class)))
class))
diff -rN -u old-smoke/src/objects/enum.lisp new-smoke/src/objects/enum.lisp
--- old-smoke/src/objects/enum.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/objects/enum.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -10,7 +10,7 @@
(defclass enum ()
((value :reader value
- :type (integer 0)
+ :type integer
:initarg :value)
(type :reader enum-type
:initarg :type))
diff -rN -u old-smoke/src/objects/object.lisp new-smoke/src/objects/object.lisp
--- old-smoke/src/objects/object.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/objects/object.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -5,7 +5,6 @@
:type smoke-index
:documentation "The objects index.")
(smoke :reader smoke :initarg :smoke
- :type foreign-pointer
:initform (null-pointer)
:documentation "Pointer to the Smoke module."))
(:documentation "A method or class in a Smoke module."))
diff -rN -u old-smoke/src/package.lisp new-smoke/src/package.lisp
--- old-smoke/src/package.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/package.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -34,6 +34,7 @@
#:pointer
#:define-smoke-module
+ #:define-takes-ownership
#+sbcl #:save-bundle))
diff -rN -u old-smoke/src/smoke-c/smoke-c.lisp new-smoke/src/smoke-c/smoke-c.lisp
--- old-smoke/src/smoke-c/smoke-c.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/smoke-c/smoke-c.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -5,6 +5,14 @@
(define-foreign-library libsmokeqt
(:unix "libsmokeqt.so.2")
(t (:default "libsmokeqt")))
+ #-mudballs
+ (define-foreign-library libsmoke-c
+ (:unix "libsmoke-c.so")
+ (t (:default "libsmoke-c")))
+ #-mudballs
+ (define-foreign-library libsmoke-c-util
+ (:unix "libsmoke-c-util.so")
+ (t (:default "libsmoke-c-util")))
(use-foreign-library libsmokeqt)
diff -rN -u old-smoke/src/smoke.lisp new-smoke/src/smoke.lisp
--- old-smoke/src/smoke.lisp 2014-09-28 09:40:42.000000000 +0200
+++ new-smoke/src/smoke.lisp 2014-09-28 09:40:42.000000000 +0200
@@ -186,3 +186,10 @@
(when (search str (name class))
(format t "~A~%" (name class))))
smoke))
+
+(defmacro define-takes-ownership (method lambda-list object)
+ "Declares METHOD transfers the ownership of OBJECT to C++."
+ `(defmethod ,method ,lambda-list
+ (cancel-finalization ,object)
+ (remove-object ,object)))
+