Re: Some questions.
Kevin Rosenberg <kevin-HJRc7zDS/[email protected]> Thu, 6 Nov 2003 10:55:02 -0700
| Newsgroups | gmane.lisp.uffi.general |
|---|---|
| Message-ID | <[email protected]> |
--SLDf9lqlvOQaIe6s
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable
Marco Antoniotti wrote:
> struct foo;
> typedef struct foo *fooPtr;
>=20
> /* Later on. */
> struct foo {
> int fooInt;
> };
>=20
(uffi:def-struct foo
(foo-int :int))
(uffi:def-foreign-type foo-ptr (* foo))
> 2 - Pointer to functions.
> struct barFun_ {
> int (* ptrToFunRetInt)(int x, double y, fooPrt *foos);
> };
>=20
> typedef struct barFun_ barFun;
I'm not aware that most CL implementations support a
pointer-to-function abstraction. Looking at Allegro's documentation, I
see that it does not. I'd probably store such a pointer as a
:pointer-void.
However, if you know a way to better present such pointers in
AllegroCL, Lispworks, CMUCL, and SBCL (the primary supported
platforms), I could add that as a primitive type to UFFI.=20
You mention perhaps not reading the manual, you may like better
reviewing the test suite files in tests/*.lisp which contain many
examples of using UFFI.
--=20
Kevin Rosenberg
kevin-HJRc7zDS/[email protected]
--SLDf9lqlvOQaIe6s
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: Digital signature
Content-Disposition: inline
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)
iD8DBQE/qor2ES7N8sSjgj4RAvgfAJ0SpSAorqtN6KSMA9xMkQJDIeeNZwCfaZ7S
11wBL3gaMDQB4W5i0gsYk2s=
=H4NG
-----END PGP SIGNATURE-----
--SLDf9lqlvOQaIe6s--