Support Clozure CL
Tue May 12 15:54:46 CEST 2009 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Support Clozure CL
hunk ./src/cxx-method.lisp 96
+#+sbcl
hunk ./src/cxx-method.lisp 119
+#+sbcl
hunk ./src/method.lisp 145
+ (register-smoke-module-var (quote ,smoke))
hunk ./src/objects/enum.lisp 8
-;;; an use thouse as enums, but C++ enums may have several symbols for
+;;; an use those as enums, but C++ enums may have several symbols for
hunk ./src/objects/enum.lisp 18
+;; Clozure CL needs this
+(defmethod make-load-form ((enum enum) &optional environment)
+ (declare (ignore environment))
+ `(make-instance 'enum
+ :value ,(value enum)
+ :type (make-instance 'smoke::smoke-type
+ :id ,(id (enum-type enum))
+ :smoke ,(smoke::get-smoke-variable-for-pointer
+ (smoke::smoke (enum-type enum))))))
+
hunk ./src/overload-resolution.lisp 208
- (format t "~S: ~S~%" type name)
hunk ./src/overload-resolution.lisp 255
- (format t "ERROR TYPE~%")
hunk ./src/package.lisp 16
+ #:get-smoke-variable-for-pointer
hunk ./src/smoke-c/smoke-c.lisp 3
-#|
+;; Load the qt smoke binding to prevent undefined aliens.
hunk ./src/smoke-c/smoke-c.lisp 11
- (use-foreign-library libsmoke-c)
-)
-|#
+ (use-foreign-library libsmoke-c))
hunk ./src/smoke-c/smoke-c.lisp 14
-
hunk ./src/smoke.lisp 109
+(let ((pointer-symbol-map (make-hash-table)))
+ (defun register-smoke-module-var (symbol)
+ "Registers SYMBOL of a variable containing a pointer to a Smoke module."
+ (setf (gethash (pointer-address (eval symbol)) pointer-symbol-map)
+ symbol))
+ (defun get-smoke-variable-for-pointer (pointer)
+ "Returns the SYMBOL of the variable whose value is POINTER."
+ (gethash (pointer-address pointer) pointer-symbol-map)))
+ [_$_]