ext/fiddle/fiddle.h in fiddle-1.0.0 vs ext/fiddle/fiddle.h in fiddle-1.0.1

- old
+ new

@@ -113,11 +113,45 @@ #if HAVE_LONG_LONG #define TYPE_LONG_LONG 6 #endif #define TYPE_FLOAT 7 #define TYPE_DOUBLE 8 +#define TYPE_VARIADIC 9 +#define TYPE_CONST_STRING 10 +#ifndef TYPE_SSIZE_T +# if SIZEOF_SIZE_T == SIZEOF_INT +# define TYPE_SSIZE_T TYPE_INT +# elif SIZEOF_SIZE_T == SIZEOF_LONG +# define TYPE_SSIZE_T TYPE_LONG +# elif defined HAVE_LONG_LONG && SIZEOF_SIZE_T == SIZEOF_LONG_LONG +# define TYPE_SSIZE_T TYPE_LONG_LONG +# endif +#endif +#define TYPE_SIZE_T (-1*SIGNEDNESS_OF_SIZE_T*TYPE_SSIZE_T) + +#ifndef TYPE_PTRDIFF_T +# if SIZEOF_PTRDIFF_T == SIZEOF_INT +# define TYPE_PTRDIFF_T TYPE_INT +# elif SIZEOF_PTRDIFF_T == SIZEOF_LONG +# define TYPE_PTRDIFF_T TYPE_LONG +# elif defined HAVE_LONG_LONG && SIZEOF_PTRDIFF_T == SIZEOF_LONG_LONG +# define TYPE_PTRDIFF_T TYPE_LONG_LONG +# endif +#endif + +#ifndef TYPE_INTPTR_T +# if SIZEOF_INTPTR_T == SIZEOF_INT +# define TYPE_INTPTR_T TYPE_INT +# elif SIZEOF_INTPTR_T == SIZEOF_LONG +# define TYPE_INTPTR_T TYPE_LONG +# elif defined HAVE_LONG_LONG && SIZEOF_INTPTR_T == SIZEOF_LONG_LONG +# define TYPE_INTPTR_T TYPE_LONG_LONG +# endif +#endif +#define TYPE_UINTPTR_T (-TYPE_INTPTR_T) + #define ALIGN_OF(type) offsetof(struct {char align_c; type align_x;}, align_x) #define ALIGN_VOIDP ALIGN_OF(void*) #define ALIGN_SHORT ALIGN_OF(short) #define ALIGN_CHAR ALIGN_OF(char) @@ -128,10 +162,10 @@ #endif #define ALIGN_FLOAT ALIGN_OF(float) #define ALIGN_DOUBLE ALIGN_OF(double) extern VALUE mFiddle; -extern VALUE rb_eFiddleError; +extern VALUE rb_eFiddleDLError; VALUE rb_fiddle_new_function(VALUE address, VALUE arg_types, VALUE ret_type); #endif /* vim: set noet sws=4 sw=4: */