git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
44 lines
1.1 KiB
Text
44 lines
1.1 KiB
Text
/* ruby.swg */
|
|
#include "ruby.h"
|
|
|
|
#define UINT2NUM(v) rb_uint2inum(v)
|
|
#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
|
|
|
|
#if defined(_WIN32) || defined(__WIN32__)
|
|
# if defined(_MSC_VER)
|
|
# if defined(STATIC_LINKED)
|
|
# define SWIGEXPORT(a) a
|
|
# else
|
|
# define SWIGEXPORT(a) __declspec(dllexport) a
|
|
# endif
|
|
# else
|
|
# if defined(__BORLANDC__)
|
|
# define SWIGEXPORT(a) a _export
|
|
# else
|
|
# define SWIGEXPORT(a) a
|
|
# endif
|
|
#endif
|
|
#else
|
|
# define SWIGEXPORT(a) a
|
|
#endif
|
|
|
|
#ifdef SWIG_GLOBAL
|
|
#define SWIGSTATICRUNTIME(a) SWIGEXPORT(a)
|
|
#else
|
|
#define SWIGSTATICRUNTIME(a) static a
|
|
#endif
|
|
|