[commonqt-devel] recent commonqt changes
David Lichteblau
david at lichteblau.com
Sun Dec 26 12:20:01 UTC 2010
Hi,
Quoting Ivan Shvedunov (ivan4th at gmail.com):
> 6. The most recent commit is an attempt to cache marshaller
> closures too, which didn't succeed so far (perhaps I've did
> something silly there). If you enable cached version of MARSHALLER
> CommonQt crashes pretty soon when method invocation callbacks
> happen. This commit shouldn't be pushed to the main repository
> yet of course.
having just read the diff:
If we went this route after all, I think the target <type> would need to
be part of the hash key. :-)
#+nil
(let ((marshaller-table (make-hash-table :test #'equal)))
(defun marshaller (obj <type>)
- (let ((key (cons (type-of obj)
+ (let ((key (list (type-of obj)
+ <type>
(when (typep obj 'qobject)
(qobject-class obj)))))
(or (gethash key marshaller-table)
(setf (gethash key marshaller-table)
(marshaller-2 (type-of obj)
(when (typep obj 'qobject)
(qobject-class obj))
<type>))))))
David
More information about the commonqt-devel
mailing list