ext/fiddle/conversions.c in fiddle-1.0.3 vs ext/fiddle/conversions.c in fiddle-1.0.4

- old
+ new

@@ -21,10 +21,22 @@ ID int_id; ID long_id; #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; ID const_string_id; ID size_t_id; @@ -39,10 +51,22 @@ RUBY_CONST_ID(int_id, "int"); RUBY_CONST_ID(long_id, "long"); #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"); RUBY_CONST_ID(const_string_id, "const_string"); RUBY_CONST_ID(size_t_id, "size_t"); @@ -69,9 +93,29 @@ return INT2NUM(TYPE_LONG); } #ifdef TYPE_LONG_LONG else if (type_id == long_long_id) { 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); }