chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Updating the zmq egg


From: Peter Bex
Subject: Re: [Chicken-users] Updating the zmq egg
Date: Fri, 6 Mar 2015 08:57:12 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

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

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]