git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@855 626c5289-ae23-0410-ae9c-e8d60b6d4f22
19 lines
448 B
Text
19 lines
448 B
Text
/* ruby.swg */
|
|
#include "ruby.h"
|
|
|
|
#define NUM2USHRT(n) NUM2UINT(n)
|
|
#define NUM2SHRT(n) (\
|
|
(SHRT_MIN <= NUM2INT(n) && NUM2INT(n) <= SHRT_MAX)\
|
|
? (short)NUM2INT(n)\
|
|
: (rb_raise(rb_eArgError, "integer %d out of range of `short'",\
|
|
NUM2INT(n)), (short)0)\
|
|
)
|
|
|
|
#ifdef __cplusplus
|
|
# define VALUEFUNC(f) ((VALUE (*)(...))f)
|
|
# define VOIDFUNC(f) ((void (*)(...))f)
|
|
#else
|
|
# define VALUEFUNC(f) (f)
|
|
# define VOIDFUNC(f) (f)
|
|
#endif
|
|
|