1 /* -----------------------------------------------------------------------------
2 * See the LICENSE file for information on copyright, usage and redistribution
3 * of SWIG, and the README file for authors - http://www.swig.org/release.html.
7 * This SWIG interface file is processed if the Guile module is run
9 * ----------------------------------------------------------------------------- */
13 %runtime "swigrun.swg"
14 %runtime "guile_gh_run.swg"
16 #define SWIG_convert_short(o) \
17 SWIG_convert_integer(o, - (1 << (8 * sizeof(short) - 1)), \
18 (1 << (8 * sizeof(short) - 1)) - 1, \
20 #define SWIG_convert_unsigned_short(o) \
21 SWIG_convert_unsigned_integer(o, 0, \
22 (1 << (8 * sizeof(short))) - 1, \
24 #define SWIG_convert_unsigned_int(o) \
25 SWIG_convert_unsigned_integer(o, 0, UINT_MAX, \
28 #define gh_scm2short(a) SWIG_convert_short(a)
29 #define gh_scm2ushort(a) SWIG_convert_unsigned_short(a)
30 #define gh_scm2uint(a) SWIG_convert_unsigned_int(a)
36 /* scm_values was implemented on C level in 1.4.1, and the prototype
37 is not included in libguile.h, so play safe and lookup `values'... */
38 #define GUILE_MAYBE_VALUES \
40 gswig_result = gh_apply(gh_lookup("values"), gswig_result);
42 #define GUILE_MAYBE_VECTOR \
44 gswig_result = gh_list_to_vector(gswig_result);
46 #define SWIG_APPEND_VALUE(object) \
47 if (gswig_result == SCM_UNSPECIFIED) { \
48 gswig_result = object; \
50 if (!gswig_list_p) { \
52 gswig_result = gh_list(gswig_result, object, SCM_UNDEFINED); \
55 gswig_result = gh_append2(gswig_result, \
56 gh_list(object, SCM_UNDEFINED)); \
64 static int _swig_module_smob_tag;
66 SWIG_GUILE_INIT_STATIC void
70 SWIG_InitializeModule(0);
71 swig_module.clientdata = (void *) &_swig_module_smob_tag;
73 SWIG_Guile_Init(&swig_module);