chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] passing a large unsigned-int to a foreign-lambda?


From: Zbigniew
Subject: Re: [Chicken-users] passing a large unsigned-int to a foreign-lambda?
Date: Mon, 19 Jun 2006 15:33:45 -0500

Try "unsigned-integer32" instead.

On 6/19/06, Graham Fawcett <address@hidden> wrote:
Hi folks, I have a foreign-lambda like this:

    (define foo (foreign-lambda* int ((unsigned-int32 flags)) ...)

Since it's a uint32, one possible value for "flags" is 2^31. But I
cannot call the procedure with this value.

    (foo (arithmetic-shift 1 31))

returns an error because the argument is not a fixnum. If I try (fxshl
1 31) instead, I get a value of 0, presumably because I'm on a 32-bit
build, which isn't right either.

Any suggestions on how to get around this?

Thanks,
Graham


_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users





reply via email to

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