Initial commit of OpenSPARC T2 architecture model.
[OpenSPARC-T2-SAM] / sam-t2 / devtools / amd64 / share / swig / 1.3.26 / guile / guile_scm.swg
CommitLineData
920dae64
AT
1/* -*- c -*-
2 This SWIG interface file is processed if the Guile module is run
3 with SCM_ flavor.
4*/
5
6#define SWIGGUILE_SCM
7
8%runtime "swigrun.swg" // Common C API type-checking code
9
10%runtime "guile_scm_run.swg"
11%include "ghinterface.i"
12%include "guile.i"
13
14%runtime %{
15
16#define GUILE_MAYBE_VALUES \
17 if (gswig_list_p) gswig_result = scm_values(gswig_result);
18
19#define GUILE_MAYBE_VECTOR \
20 if (gswig_list_p) gswig_result = scm_vector(gswig_result);
21
22#define SWIG_APPEND_VALUE(object) \
23 if (gswig_result == SCM_UNSPECIFIED) \
24 gswig_result = object; \
25 else { \
26 if (!gswig_list_p) { \
27 gswig_list_p = 1; \
28 gswig_result = scm_listify(gswig_result, object, SCM_UNDEFINED); \
29 } \
30 else \
31 gswig_result = scm_append(scm_listify(gswig_result, scm_listify(object, SCM_UNDEFINED), SCM_UNDEFINED)); \
32 }
33 /* used by Lib/exception.i */
34 #define gh_symbol2scm scm_str2symbol
35 /* useb by Lib/cdata.i */
36 #define gh_str2scm scm_mem2string
37
38%}
39
40%insert(init) "swiginit.swg"
41
42%init %{
43SWIG_GUILE_INIT_STATIC void
44SWIG_init(void)
45{
46 SWIG_InitializeModule(0);
47 SWIG_PropagateClientData();
48%}