Load Smoke libraries at compile time.
Fri Jun 12 14:21:44 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Load Smoke libraries at compile time.
diff -rN -u old-smoke/src/clos.lisp new-smoke/src/clos.lisp
--- old-smoke/src/clos.lisp 2014-09-28 09:41:03.000000000 +0200
+++ new-smoke/src/clos.lisp 2014-09-28 09:41:04.000000000 +0200
@@ -106,19 +106,6 @@
(go default))))
-(defclass smoke-standard-object ()
- ((pointer :reader pointer
- :initarg :pointer
- :documentation "Pointer to the C++ object.")
- ;; We can not have a global table of objects owned by C++,
- ;; since then they would be alway reacable from Lisp and thus
- ;; cycles would never be garbage collected.
- (owned-objects :accessor owned-objects
- :initform nil
- :type list
- :documentation "Objecsts owned by the C++ instance."))
- (:documentation "The standard superclass for Smoke classes."))
-
(defmethod print-object ((object smoke-standard-object) stream)
(if (slot-boundp object 'pointer)
(print-unreadable-object (object stream :type t)
diff -rN -u old-smoke/src/objects/stack.lisp new-smoke/src/objects/stack.lisp
--- old-smoke/src/objects/stack.lisp 2014-09-28 09:41:03.000000000 +0200
+++ new-smoke/src/objects/stack.lisp 2014-09-28 09:41:04.000000000 +0200
@@ -28,6 +28,19 @@
(setf (foreign-slot-value (top stack)
'smoke-stack-item type) value)
(incf-pointer (top stack) (foreign-type-size 'smoke-stack-item)))
+
+(defclass smoke-standard-object ()
+ ((pointer :reader pointer
+ :initarg :pointer
+ :documentation "Pointer to the C++ object.")
+ ;; We can not have a global table of objects owned by C++,
+ ;; since then they would be alway reacable from Lisp and thus
+ ;; cycles would never be garbage collected.
+ (owned-objects :accessor owned-objects
+ :initform nil
+ :type list
+ :documentation "Objecsts owned by the C++ instance."))
+ (:documentation "The standard superclass for Smoke classes."))
(defun push-smoke-stack (stack value type-id)
(ecase type-id
diff -rN -u old-smoke/src/smoke.lisp new-smoke/src/smoke.lisp
--- old-smoke/src/smoke.lisp 2014-09-28 09:41:03.000000000 +0200
+++ new-smoke/src/smoke.lisp 2014-09-28 09:41:04.000000000 +0200
@@ -168,10 +168,11 @@
"Define a Smoke module."
`(progn
(eval-startup (:compile-toplevel :execute)
+ (eval-when (:compile-toplevel :load-toplevel :execute)
(define-foreign-library ,library
(:unix ,(format nil "~(~A~).so.2" library))
(t (:default ,(format nil "~(~A~)" library))))
- (use-foreign-library ,library)
+ (use-foreign-library ,library))
(defcvar (,variable ,variable-name :read-only t) :pointer)
(defcfun (,init-function ,(format nil "_Z~A~Av" (length function-name)
function-name))