cleanup --> to head
Sun Mar 13 20:40:35 CET 2011 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Fix loading on OSX.
Thanks to Elliott Slaughter
hunk ./src/qt.core.lisp 36
- (:unix "libclsmokeqtcore.so")
+ (:darwin "libclsmokeqtcore.dylib")
+ (:unix "libclsmokeqtcore.so")
Sat Apr 3 14:34:21 CEST 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* Account for possible lisp-object metatype id change when loading an image.
hunk ./src/variant.lisp 79
-(macrolet
- ((variant-conversions ((variant) &body types)
- (let* ((special-types '(long-long ulong-long map list hash))
- (exclude-types
- (append '(63) ;; ColorGroup
- (mapcar #'(lambda (s)
- (value
- (symbol-value
- (intern (format nil "VARIANT.+~A+" s)
- :qt))))
- special-types)))
- (qt-types (loop for i from 1 to (value qt:variant.+user-type+)
- when (and (qt:variant.type-to-name i)
- ;; type-to-name returns longlong but
- ;; should be LongLong
- (not (member i exclude-types)))
- collect
- (smoke::lispify (qt:variant.type-to-name i)
- :qt))))
- `(ecase (cxx:user-type ,variant)
- ,@(loop for type in (append types special-types
- (remove nil qt-types))
- collect
- (if (symbolp type)
- `(,(value (symbol-value [_$_]
- (let ((*package*
- (find-package :cl-smoke.qt)))
- (symbolicate 'variant.+ type '+))))
- ,(if (fboundp (intern (format nil "TO-~A" type) :cxx))
- `(,(intern (format nil "TO-~A" type) :cxx) ,variant)
- `(copy-object-from-pointer
- ;; intern since these types are in
- ;; qt.gui not qt.core
- (intern ,(symbol-name type) :qt)
- (cxx:const-data ,variant))))
- type))))))
- (defun qt:from-variant (variant)
- "Returns the value of VARIANT."
- (variant-conversions (variant)
- (#.(value qt:variant.+invalid+)
- (cerror "Return (VALUES)" "Type of variant ~A is invalid." variant)
- (values))
- (#.*cxx-lisp-object-metatype*
- (let* ((lisp-object (cl-smoke-lisp-object-value (pointer variant)))
- (value))
- (setf value (translate-cxx-lisp-object lisp-object))
- (free-cxx-lisp-object lisp-object)
- value)))))
+(eval-startup ()
+;; *cxx-lisp-object-metatype* can change when loading an image
+(eval '
+ (macrolet
+ ((variant-conversions ((variant) &body types)
+ (let* ((special-types '(long-long ulong-long map list hash))
+ (exclude-types
+ (append '(63) ;; ColorGroup
+ (mapcar #'(lambda (s)
+ (value
+ (symbol-value
+ (intern (format nil "VARIANT.+~A+" s)
+ :qt))))
+ special-types)))
+ (qt-types (loop for i from 1 to (value qt:variant.+user-type+)
+ when (and (qt:variant.type-to-name i)
+ ;; type-to-name returns longlong but
+ ;; should be LongLong
+ (not (member i exclude-types)))
+ collect
+ (smoke::lispify (qt:variant.type-to-name i)
+ :qt))))
+ `(ecase (cxx:user-type ,variant)
+ ,@(loop for type in (append special-types
+ (remove nil qt-types))
+ collect
+ `(,(value (symbol-value [_$_]
+ (let ((*package*
+ (find-package :cl-smoke.qt)))
+ (symbolicate 'variant.+ type '+))))
+ ,(if (fboundp (intern (format nil "TO-~A" type) :cxx))
+ `(,(intern (format nil "TO-~A" type) :cxx) ,variant)
+ `(copy-object-from-pointer
+ ;; intern since these types are in
+ ;; qt.gui not qt.core
+ (intern ,(symbol-name type) :qt)
+ (cxx:const-data ,variant)))))
+ ,@(loop for type in types
+ collect
+ `(,(eval (first type))
+ ,@(rest type)))))))
+ (defun qt:from-variant (variant)
+ "Returns the value of VARIANT."
+ (variant-conversions (variant)
+ ((value qt:variant.+invalid+)
+ (cerror "Return (VALUES)" "Type of variant ~A is invalid." variant)
+ (values))
+ (*cxx-lisp-object-metatype*
+ (let* ((lisp-object (cl-smoke-lisp-object-value (pointer variant)))
+ (value))
+ (setf value (translate-cxx-lisp-object lisp-object))
+ (free-cxx-lisp-object lisp-object)
+ value)))))))
Sat Feb 20 22:04:46 CET 2010 Tobias Rautenkranz <tobias@rautenkranz.ch>
* cleanup
hunk ./src/list.lisp 75
- list-pointer))))
+ list-pointer))))
hunk ./src/list.lisp 80
- (smoke:object-to-lisp
+ (object-to-lisp
hunk ./src/list.lisp 83
- (smoke:make-smoke-type ,(symbolicate '*smoke-module*)
- ,type-name)))))))
+ (make-smoke-type ,(symbolicate '*smoke-module*)
+ ,type-name)))))))
hunk ./src/vector.lisp 96
-(defun from-vector-point (elements)
- (make-cleanup-pointer
- (make-qvector (make-smoke-type *smoke-module* "QPoint")
- elements)
- #'free-qvector))
-
-(defun vector-point-p (sequence)
- (every #'(lambda (element) (typep element 'qt:point))
- sequence))
-