[cffi-devel] :uint64 ... how to handle on non-supporting platform ?
Frank Goenninger
frgo at me.com
Sat Jan 16 20:53:32 UTC 2010
Thanks, binghe (how is that pronounced, btw ?), I'll go with the
helper dll approach as you suggested. Easy enough ;-)
Cheers
Frank
Am 16.01.2010 um 21:49 schrieb Chun Tian (binghe):
> Hi, Frank
>
> Unlike other CLs, Allegro CL is especially good at using "helper
> dlls", that is, you create a C function which doesn't use any 64-bit
> arguments in your own DLL and your function could call any other C
> library's functions which may have 64-bit arguments. Then you use
> CFFI to load the helper DLL instead. Of course you have to handle
> type coerce from 32-bit to 64-bit by yourself. For example, the
> "delivery-tag" in your sample could be changed to two 32-bit
> arguments "delivery-tag_L" and "delivery_tag_H", both of them are
> typed of :uint32.
>
> CFFI itself is excellent, however Franz (Allegro CL's vendor) is
> lazy ...
>
> --binghe
>
> 在 2010-1-16,21:24, Frank Goenninger 写道:
>
>> Hi -
>>
>> thanks to Louis for answering my last question about function
>> pointers.
>>
>> I now have a new challenge: How to handle :uint64 when I using
>> AllegroCL 8.1 express edition on Mac OS X when this implementation is
>> not supporting :unsigned-long-long ?
>>
>> I do have:
>>
>> (defcfun ("amqp_basic_ack" %amqp-basic-ack) :int
>> (state amqp-connection-state-t)
>> (channel amqp-channel-t)
>> (delivery-tag :uint64) ;;; <<<<<< ---- this is my problem ...
>> (multiple amqp-boolean-t))
>>
>> Could I get around this with a clever padding of the 'multiple'
>> argument ?
>>
>> Thanks for any advice!
>>
>> Cheers
>> Frank
>>
>>
>>
>>
>> _______________________________________________
>> cffi-devel mailing list
>> cffi-devel at common-lisp.net
>> http://common-lisp.net/cgi-bin/mailman/listinfo/cffi-devel
>
More information about the cffi-devel
mailing list