[clpython-devel] Re: CLPython on SBCL
Willem Broekema
metawilm at gmail.com
Thu May 1 19:55:41 UTC 2008
On Thu, May 1, 2008 at 7:30 PM, Robert Brown <brown at google.com> wrote:
> The call to ensure-class without
>
> :metaclass 'py-core-type
>
> succeeds.
>
> The call with the :metaclass argument fails inside change-class:
>
> (defmethod change-class ((instance standard-object) (new-class
> standard-class)
> &rest initargs)
> (unless (class-finalized-p new-class)
> (finalize-inheritance new-class))
> (let ((cpl (class-precedence-list new-class)))
> (dolist (class cpl)
> (macrolet
> ((frob (class-name)
> `(when (eq class (find-class ',class-name))
> (error 'metaobject-initialization-violation
> :format-control "~@<Cannot ~S objects into ~S
> metaobjects.~@:>"
> :format-arguments (list 'change-class ',class-name)
> :references (list '(:amop :initialization
> ,class-name))))))
> (frob class)
> (frob generic-function)
> (frob method)
> (frob slot-definition))))
> (change-class-internal instance new-class initargs))
>
> CLASS is on the class precedence list of PY-CORE-TYPE.
>
Thanks, I'm going to look into this.
- Willem
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/clpython-devel/attachments/20080501/ddf91684/attachment.html>
More information about the Clpython-devel
mailing list