This is the mail archive of the libffi-discuss@sourceware.org mailing list for the libffi project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: closure api return value types problem


The "ffi_arg" type is meant to represent the largest integral type held in a register, more or less.  It is assumed that "resp" points to the appropriately-sized memory.

On Mar 26, 2010, at 4:25 PM, Sergei Trofimovich wrote:

>> Just looked at cls_ushort.c(and other integrals) test:
>>  *(ffi_arg*)resp = *(unsigned short *)args[0]; /* !! *(unsigned short*)resp expected !! */
>> and cls_float.c
>>   *(float *)resp = *(float *)args[0];
>> 
>> Integrals seem to strangely be casted to 'ffi_arg *'(long *) while FPU ones
>> are casted to their real type. It's normal (but undocumented) or it's a
>> horrible inconsistency bug?
> 
> Did I ask something wrong? :\
> 
> -- 
> 
>  Sergei


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]