1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* ext/fiddle/conversions.c (generic_to_value): ffi_arg and ffi_sarg

should be used to handle shorter return value. fix [Bug #3861]
  [ruby-core:32504]
* ext/fiddle/closure.c (callback): ditto
* ext/fiddle/conversions.h (fiddle_generic): ditto
* ext/fiddle/conversions.c (value_to_generic): char, short and int
  are strictly distinguished on big-endian CPU, e.g. sparc64.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32895 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ngoto 2011-08-09 05:31:47 +00:00
parent e26cead1e9
commit 4d71d34855
4 changed files with 28 additions and 5 deletions

View file

@ -5,6 +5,8 @@
typedef union
{
ffi_arg fffi_arg; /* rvalue smaller than unsigned long */
ffi_sarg fffi_sarg; /* rvalue smaller than signed long */
unsigned char uchar; /* ffi_type_uchar */
signed char schar; /* ffi_type_schar */
unsigned short ushort; /* ffi_type_sshort */