diff options
author | Kenta Murata <[email protected]> | 2020-12-11 09:41:12 +0900 |
---|---|---|
committer | GitHub <[email protected]> | 2020-12-11 09:41:12 +0900 |
commit | 9b0c36b39032cffff3c62a2b0e1fc38fa429f5ea (patch) | |
tree | 667648b7563a97e5d5270baccd5654d5de91358c /ext/fiddle/conversions.c | |
parent | 6b1d2de6cc2e85fda7885fe77dbd7c99c4eb1ef2 (diff) |
Import fiddle-1.0.4 (#3860)
I don't use tool/sync_default_gem.rb because the last sync was incomplete.
Co-authored-by: Hiroshi SHIBATA <[email protected]>
Co-authored-by: Alan Wu <[email protected]>
Co-authored-by: sinisterchipmunk <[email protected]>
Co-authored-by: Sutou Kouhei <[email protected]>
Notes
Notes:
Merged-By: mrkn <[email protected]>
Diffstat (limited to 'ext/fiddle/conversions.c')
-rw-r--r-- | ext/fiddle/conversions.c | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/ext/fiddle/conversions.c b/ext/fiddle/conversions.c index fdfc3fcbf2..6e0ce36378 100644 --- a/ext/fiddle/conversions.c +++ b/ext/fiddle/conversions.c @@ -23,6 +23,18 @@ rb_fiddle_type_ensure(VALUE type) #ifdef TYPE_LONG_LONG ID long_long_id; #endif +#ifdef TYPE_INT8_T + ID int8_t_id; +#endif +#ifdef TYPE_INT16_T + ID int16_t_id; +#endif +#ifdef TYPE_INT32_T + ID int32_t_id; +#endif +#ifdef TYPE_INT64_T + ID int64_t_id; +#endif ID float_id; ID double_id; ID variadic_id; @@ -41,6 +53,18 @@ rb_fiddle_type_ensure(VALUE type) #ifdef TYPE_LONG_LONG RUBY_CONST_ID(long_long_id, "long_long"); #endif +#ifdef TYPE_INT8_T + RUBY_CONST_ID(int8_t_id, "int8_t"); +#endif +#ifdef TYPE_INT16_T + RUBY_CONST_ID(int16_t_id, "int16_t"); +#endif +#ifdef TYPE_INT32_T + RUBY_CONST_ID(int32_t_id, "int32_t"); +#endif +#ifdef TYPE_INT64_T + RUBY_CONST_ID(int64_t_id, "int64_t"); +#endif RUBY_CONST_ID(float_id, "float"); RUBY_CONST_ID(double_id, "double"); RUBY_CONST_ID(variadic_id, "variadic"); @@ -73,6 +97,26 @@ rb_fiddle_type_ensure(VALUE type) return INT2NUM(TYPE_LONG_LONG); } #endif +#ifdef TYPE_INT8_T + else if (type_id == int8_t_id) { + return INT2NUM(TYPE_INT8_T); + } +#endif +#ifdef TYPE_INT16_T + else if (type_id == int16_t_id) { + return INT2NUM(TYPE_INT16_T); + } +#endif +#ifdef TYPE_INT32_T + else if (type_id == int32_t_id) { + return INT2NUM(TYPE_INT32_T); + } +#endif +#ifdef TYPE_INT64_T + else if (type_id == int64_t_id) { + return INT2NUM(TYPE_INT64_T); + } +#endif else if (type_id == float_id) { return INT2NUM(TYPE_FLOAT); } |