[Openmcl-devel] foleign type (:array :signed-byte 4))
gb at clozure.com
Fri Jan 16 11:34:12 PST 2004
On Fri, 16 Jan 2004, Marco Baringer wrote:
> I'd like to call a foreign function which takes a parameter of type
> (:array :signed-byte 4) i've defined the type with:
> (ccl::def-foreign-type :UVersionInfo (:array :signed-byte 4))
> Which works perfectly, the problem arises when i try to define a
> function which calls this foreign function. Evaluating (or even just
> macro expanding) a FF-CALL form which uses UVersionInfo for one of the
> args gives the error "can't determine representation keyword for
> :UVERSIONINFO". is this a bug or am i missing something?
The function CCL::FOREIGN-TYPE-TO-REPRESENTATION-TYPE is missing
a) a TYPECASE clause for FOREIGN-ARRAY-TYPE
b) some conditionalization, since Linux handles this differently.
The last clause in the TYPECASE should be changed to indicate that
FOREIGN-ARRAY-TYPE and FOREIGN-RECORD-TYPE are handled the same way:
((or foreign-record-type foreign-array-type)
(let* ((bits (ensure-foreign-type-bits ftype)))
(ceiling bits 32))))
> Ring the bells that still can ring.
> Forget the perfect offering.
> There is a crack in everything.
> That's how the light gets in.
> -Leonard Cohen
> Openmcl-devel mailing list
> Openmcl-devel at clozure.com
More information about the Openmcl-devel