:pointer-self and LispWorks
Edi Weitz <[email protected]> 12 Aug 2003 12:41:59 +0200
| Newsgroups | gmane.lisp.uffi.general |
|---|---|
| Message-ID | <[email protected]> |
Hi!
It looks to me like :pointer-self doesn't work with LW. (LW is 4.2.7
pro on Linux, UFFI is 1.2.21.)
If I compile the following code...
(def-struct foo
(bar :pointer-self))
(def-foreign-type foo-ptr (* foo))
(def-function "baz"
((x :int))
:returning foo-ptr
:module "frob")
(defun test ()
(with-foreign-object (p 'foo)
(baz p)))
...I get an error like
**++++ Error in TEST:
Illegal foreign type (* FOO).
However, if I replace the first DEF-STRUCT with...
(def-struct foo
(bar foo-ptr))
...everything works fine. So, the forward reference from the
definition of FOO to FOO-PTR doesn't seem to be a problem while the
forward reference to (* FOO) from within FOO's definition obviously
is.
Thanks,
Edi.