On Thu, Mar 05, 2015 at 06:24:26PM -0700, Matt Gushee wrote: > Thanks, but I guess my question wasn't sufficiently clear. My updated code > already has: > > * (foreign-lambda int zmq_recv socket message size_t int); and > (foreign-lambda int zmq_send socket message size_t int)* > What I was wondering is whether I need to take any special measures to > ensure that the value being passed as a size_t is in the correct range. In > this case, the 'len' argument is produced by calling (number-of-bytes > data). I would be really surprised if that value ever exceed the int32 > range, but I suppose that could theoretically happen.
It accepts a flonum, so if you exceed 32 bits, you can go all the way up to 52 bits without precision loss. If you need more bits, you'll get into trouble because the air gets too thin ;) I'm working on adding core bignum support to CHICKEN 5, which shall eliminate this problem and allow you to use arbitrarily large integers in the FFI as well. Cheers, Peter
signature.asc
Description: Digital signature
_______________________________________________ Chicken-users mailing list Chicken-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/chicken-users