* -----------------------------------------------------------------------
* Lib/guile/guile_gh_run.swg
* Copyright (C) 2004 John Lenz <lenz@cs.wisc.edu>
* ----------------------------------------------------------------------- */
typedef SCM (*swig_guile_proc)();
#define SWIG_malloc(size) \
#define SWIG_ConvertPtr(s, result, type, flags) \
SWIG_Guile_ConvertPtr(&swig_module, s, result, type, flags)
#define SWIG_MustGetPtr(s, type, argnum, flags) \
SWIG_Guile_MustGetPtr(&swig_module, s, type, argnum, flags, FUNC_NAME)
#define SWIG_NewPointerObj(ptr, type, owner) \
SWIG_Guile_NewPointerObj(&swig_module, (void*)ptr, type, owner)
#define SWIG_GetModule(clientdata) SWIG_Guile_GetModule()
#define SWIG_SetModule(clientdata, pointer) SWIG_Guile_SetModule(pointer)
/* Ignore object-ownership changes in gh mode */
#define SWIG_Guile_MarkPointerNoncollectable(s) (s)
#define SWIG_Guile_MarkPointerDestroyed(s) (s)
#define SWIG_contract_assert(expr, msg) \
scm_error(gh_symbol2scm("swig-contract-assertion-failed"), \
(char *) FUNC_NAME, (char *) msg, \
SCM_EOL, SCM_BOOL_F); else
/* SCM_CHAR and SCM_CHARP were introduced in Guile 1.4; the following is for
# define SCM_CHAR SCM_ICHR
# define SCM_CHARP SCM_ICHRP
/* This function replaces gh_scm2char, which is broken in Guile 1.4 */
if (SCM_CHARP(s)) return SCM_CHAR(s);
scm_wrong_type_arg(NULL, 0, s);
#define gh_scm2char GSWIG_scm2char
#define SWIG_scm2str(x) gh_scm2newstr(x, NULL)
/* More 1.3.4 compatibility */
# define SCM_INPUT_PORT_P SCM_INPORTP
# define SCM_OUTPUT_PORT_P SCM_OUTPORTP
static swig_type_info *SWIG_Guile_LookupType(swig_module_info *module, SCM s, int normal) {
if ((normal && (unsigned long) SCM_TYP16(s) == *((int *)iter->clientdata))) {
return iter->types[(long) SCM_CAR(s) >> 16];
} while (iter != module);
#define SWIG_GUILE_MODULE_STATIC
#elif !defined(SWIG_NOINCLUDE)
#define SWIG_GUILE_MODULE_STATIC static
#ifdef SWIG_GUILE_MODULE_STATIC
static swig_module_info *swig_guile_module = 0;
SWIG_GUILE_MODULE_STATIC swig_module_info *SWIG_Guile_GetModule() {
return swig_guile_module;
SWIG_GUILE_MODULE_STATIC void SWIG_Guile_SetModule(swig_module_info *pointer) {
swig_guile_module = pointer;
SWIGEXPORT swig_module_info * SWIG_Guile_GetModule();
SWIGEXPORT void SWIG_Guile_SetModule(swig_module_info *pointer);
SWIG_Guile_NewPointerObj(swig_module_info *module, void *ptr, swig_type_info *type, int owner)
if (ptr==NULL) return SCM_EOL;
if (!module) return SCM_EOL;
for (tag = 0; tag < module->size; ++tag) {
if (module->types[tag] == type)
SCM_RETURN_NEWSMOB( ((tag << 16) | *((int *)module->clientdata)), ptr);
/* Return 0 if successful. */
SWIG_Guile_ConvertPtr(swig_module_info *module, SCM s, void **result, swig_type_info *type, int flags)
} else if (SCM_NIMP(s)) {
from = SWIG_Guile_LookupType(module, s, 1);
cast = SWIG_TypeCheckStruct(from, type);
*result = SWIG_TypeCast(cast, (void *) SCM_CDR(s));
*result = (void *) SCM_CDR(s);
SWIG_Guile_MustGetPtr (swig_module_info *module, SCM s, swig_type_info *type,
int argnum, int flags, const char *func_name)
if (SWIG_Guile_ConvertPtr(module, s, &result, type, flags)) {
scm_wrong_type_arg((char *) func_name, argnum, s);
print_swig (SCM swig_smob, SCM port, scm_print_state *pstate)
swig_type_info *type = SWIG_Guile_LookupType(0, swig_smob, 1);
scm_puts((char *) "#<swig ", port);
scm_puts((char *) type->str, port);
scm_puts((char *) type->name, port);
scm_puts((char *) " ", port);
scm_intprint((long) SCM_CDR(swig_smob), 16, port);
scm_puts((char *) ">", port);
/* non-zero means success */
equalp_swig (SCM A, SCM B)
if (SCM_CAR(A) == SCM_CAR(B)
&& SCM_CDR(A) == SCM_CDR(B))
SWIG_Guile_Init (swig_module_info *module)
*((int *)module->clientdata) =
scm_make_smob_type_mfpe((char *) "swig", 0, NULL, NULL, print_swig, equalp_swig);
SWIG_Guile_GetArgs (SCM *dest, SCM rest,
int reqargs, int optargs,
for (i = 0; i<reqargs; i++) {
scm_wrong_num_args(gh_str02scm((char *) procname));
for (i = 0; i<optargs && SCM_CONSP(rest); i++) {
scm_wrong_num_args(gh_str02scm((char *) procname));
/* guile.swg ends here */