1 /* ----------------------------------------------------------------------------- 2 * mzscheme.swg 3 * 4 * SWIG Configuration File for MzScheme. 5 * This file is parsed by SWIG before reading any other interface file. 6 * ----------------------------------------------------------------------------- */ 7 8 /* Include headers */ 9 %runtime "swigrun.swg" // Common C API type-checking code 10 %runtime "mzrun.swg" 11 12 %define SWIG_APPEND_VALUE(value) 13 values[lenv++] = value 14 %enddef 15 16 /* Definitions */ 17 #define SWIG_malloc(size) swig_malloc(size, FUNC_NAME) 18 #define SWIG_free(mem) free(mem) 19 20 #define SWIG_convert_short(o) \ 21 SWIG_convert_integer(o, - (1 << (8 * sizeof(short) - 1)), \ 22 (1 << (8 * sizeof(short) - 1)) - 1, \ 23 FUNC_NAME, $argnum-1, argc, argv) 24 #define SWIG_convert_int(o) \ 25 SWIG_convert_integer(o, INT_MIN, INT_MAX, \ 26 FUNC_NAME, $argnum-1, argc, argv) 27 #define SWIG_convert_long(o) \ 28 SWIG_convert_integer(o, LONG_MIN, LONG_MAX, \ 29 FUNC_NAME, $argnum-1, argc, argv) 30 #define SWIG_convert_unsigned_short(o) \ 31 SWIG_convert_unsigned_integer(o, 0, \ 32 (1 << (8 * sizeof(short))) - 1, \ 33 FUNC_NAME, $argnum-1, argc, argv) 34 #define SWIG_convert_unsigned_int(o) \ 35 SWIG_convert_unsigned_integer(o, 0, UINT_MAX, \ 36 FUNC_NAME, $argnum-1, argc, argv) 37 #define SWIG_convert_unsigned_long(o) \ 38 SWIG_convert_unsigned_integer(o, 0, ULONG_MAX, \ 39 FUNC_NAME, $argnum-1, argc, argv) 40 41 /* Guile compatibility kludges */ 42 #define SCM_VALIDATE_VECTOR(argnum, value) (void)0 43 #define SCM_VALIDATE_LIST(argnum, value) (void)0 44 45 /* Read in standard typemaps. */ 46 %include <typemaps.i> 47 48 %insert(init) "swiginit.swg" 49 50 %init %{ 51 Scheme_Object *scheme_reload(Scheme_Env *env) { 52 Scheme_Env *menv = SWIG_MZSCHEME_CREATE_MENV(env); 53 54 SWIG_InitializeModule((void *) env); 55 %} 56