chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] C_word type / Cython (warning: passing argument 2 fr


From: Bobby Powers
Subject: Re: [Chicken-users] C_word type / Cython (warning: passing argument 2 from incompatible pointer type)
Date: Sun, 13 Feb 2011 00:51:07 -0800

In C, at least on *nix machines, a long is defined to be the same as the pointer size.  So on 32-bit systems its synonymous with int, and on 64-bit its the same as long long.  Why then explicitly define C_word to int on 32-bit then, as 'long' should work on both 32 and 64 bit platforms?

yours,
Bobby

On Sat, Feb 12, 2011 at 9:59 AM, Jim Ursetto <address@hidden> wrote:
C_word is the fundamental scheme object type.  The underlying type of int or long is just used to make the width of this type 32-bit or 64-bit, and the actual representation is indicated by a type tag (some subset of bits in that word).  So it actually can return an arbitrary result.  See Data Representation in the manual for details.

Jim

On Feb 12, 2011, at 6:47, David Dreisigmeyer <address@hidden> wrote:

> Thanks Felix,
>
> Mt question wasn't clear.  What about C_word's use here:
>
> int CHICKEN_eval_string (char *str, C_word *result)
>
> Wouldn't this be able to return arbitrary results?  I was thinking
> that this is like CHICKEN_eval_string_to_string except an actual
> scheme _expression_ is returned instead of a string.
>
>
> On Sat, Feb 12, 2011 at 5:11 AM, Felix
> <address@hidden> wrote:
>> From: David Dreisigmeyer <address@hidden>
>> Subject: [Chicken-users] C_word type / Cython (warning: passing argument 2 from incompatible pointer type)
>> Date: Fri, 11 Feb 2011 17:47:24 -0500
>>
>>> Here's the solution on the Cython side.
>>>
>>> Is C_word a long (or int) though?
>>>
>>
>> A long on 64-bit platforms and an int on 32-bit systems.
>>
>>
>> cheers,
>> felix
>>
>
> _______________________________________________
> Chicken-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/chicken-users

_______________________________________________
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]