[Openmcl-cvs-notifications] r14766 - /trunk/source/lib/foreign-types.lisp

gb at clozure.com gb at clozure.com
Sun May 1 07:24:36 CDT 2011


Author: gb
Date: Sun May  1 07:24:36 2011
New Revision: 14766

Log:
Give the foreign :FLOAT and :DOUBLE types canonical type ordinals.
(Among other things, this means that the macroexpansion of RLET involving t=
hese types
doesn't have to do a (often type-checked) structure reference to
what turns out to be a constant foreign type.)

In the more general case, it'd be nice if the programmer could be trusted
to say (FOO-STRUCT-ACCESSOR (THE FOO X)).  (Or at least it's not nice that
they apparently can't be.  CCL as Nerf Lisp, which offers Safe Indoor Fun
For The Whole Family!)

Modified:
    trunk/source/lib/foreign-types.lisp

Modified: trunk/source/lib/foreign-types.lisp
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D
--- trunk/source/lib/foreign-types.lisp (original)
+++ trunk/source/lib/foreign-types.lisp Sun May  1 07:24:36 2011
@@ -1757,6 +1757,8 @@
       (canonicalize-foreign-type-ordinal '(:struct :dirent))
       (canonicalize-foreign-type-ordinal '(:struct :timeval))
       (canonicalize-foreign-type-ordinal '(:struct :addrinfo))
+      (canonicalize-foreign-type-ordinal :float)
+      (canonicalize-foreign-type-ordinal :double)
 =

       (setq canonical-ordinal (1- max-common-foreign-type-ordinal))
 =




More information about the Openmcl-cvs-notifications mailing list