mirror of
https://github.com/gcc-mirror/gcc.git
synced 2026-05-06 14:59:39 +02:00
resolve.cc (get_ffi_type_from_signature): Handle case where boolean is an int.
* resolve.cc (get_ffi_type_from_signature): Handle case where boolean is an int. From-SVN: r31637
This commit is contained in:
@@ -856,6 +856,16 @@ get_ffi_type_from_signature (unsigned char* ptr)
|
||||
break;
|
||||
|
||||
case 'Z':
|
||||
// On some platforms a bool is a byte, on others an int.
|
||||
if (sizeof (jboolean) == sizeof (jbyte))
|
||||
return &ffi_type_sint8;
|
||||
else
|
||||
{
|
||||
JvAssert (sizeof (jbyte) == sizeof (jint));
|
||||
return &ffi_type_sint32;
|
||||
}
|
||||
break;
|
||||
|
||||
case 'B':
|
||||
return &ffi_type_sint8;
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user