Never mind my previous patch, this one is better.

Previously, in order to read double floats, I reset
*read-default-float-format*, but that makes global changes, sometimes
undesirable.  So instead, in this version, if the format is specified
as "D", it will create a number that Lisp will read as double float.
Otherwise the :format argument should be NIL or a C format
string ("D" is unused in C).

So for example
(constant (+mksa-plancks-constant-h+ GSL_CONST_MKSA_PLANCKS_CONSTANT_H)
          :format "D")
becomes
(cl:defconstant +mksa-plancks-constant-h+ 6.626069d-34)

If the :format argument is not given or is nil, the expansion of constant
should be identical to the original.

Liam

Attachment: diff
Description: Binary data

_______________________________________________
cffi-devel mailing list
cffi-devel@common-lisp.net
http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel

Reply via email to