New way of sharing type information between modules for chicken, mzscheme,
ruby, tcl, and perl. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6332 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
9a8f7b5c44
commit
9dead7a11d
13 changed files with 203 additions and 84 deletions
|
|
@ -1,6 +1,16 @@
|
|||
Version 1.3.23 (in progress)
|
||||
============================
|
||||
|
||||
10/05/2004: wuzzeb (John Lenz)
|
||||
- Reorganize how runtime type information is stored and shared
|
||||
between modules. For chicken and mzscheme, I removed
|
||||
the ability to use runtime libraries, while perl, tcl, python, and
|
||||
ruby default to using the new method but can go back to the old
|
||||
method by declaring SWIG_ALLOW_RUNTIME.
|
||||
|
||||
- line 582 in mzscheme.cxx was generating a segfault on
|
||||
imports.multicpptest, so I fixed it.
|
||||
|
||||
10/04/2004: wsfulton
|
||||
Fixes for %extend and overloaded static methods with default
|
||||
arguments.
|
||||
|
|
|
|||
|
|
@ -601,6 +601,19 @@ $realmodule_swig_init(int argc, C_word closure, C_word continuation) {
|
|||
C_word ret;
|
||||
|
||||
if (!typeinit) {
|
||||
/* lookup the type pointer... it is stored in it's own symbol table */
|
||||
C_SYMBOL_TABLE *stable = C_find_symbol_table("swig_runtime_data");
|
||||
if (stable != NULL) {
|
||||
sym = SWIG_Chicken_LookupSymbol("type_pointer", stable);
|
||||
if (C_truep(sym) && C_swig_is_ptr(sym)) {
|
||||
swig_type_list_handle = (swig_type_info **) C_block_item(sym, 0);
|
||||
}
|
||||
} else {
|
||||
stable = C_new_symbol_table("swig_runtime_data", 16);
|
||||
sym = C_intern_in(C_heaptop, C_strlen("type_pointer"), "type_pointer", stable);
|
||||
C_mutate(&C_block_item(sym, 0), C_mpointer(C_heaptop, (void *) swig_type_list_handle));
|
||||
}
|
||||
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -60,27 +60,7 @@ enum {
|
|||
SWIG_BARF1_ARGUMENT_NULL /* 1 arg */
|
||||
};
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
/*SWIGIMPORT(void) SWIG_Chicken_Init();*/
|
||||
|
||||
/* Interface helper function */
|
||||
SWIGIMPORT(char *) SWIG_Chicken_MakeString(C_word str);
|
||||
|
||||
/* Get a pointer value from a C_word. If there is a type-mismatch,
|
||||
return nonzero; on success, return 0. */
|
||||
SWIGIMPORT(int) SWIG_Chicken_ConvertPtr(C_word s, void **result, swig_type_info *type, int flags);
|
||||
/* Get a pointer value from a C_word. If there is a type-mismatch,
|
||||
signal a wrong-type-arg error for the given argument number. */
|
||||
SWIGIMPORT(void *) SWIG_Chicken_MustGetPtr(C_word s, swig_type_info *type, int argnum, int flags);
|
||||
/* Make a smob from a pointer and typeinfo, using space as the memory for the new object */
|
||||
SWIGIMPORT(C_word) SWIG_Chicken_NewPointerObj(void *ptr, swig_type_info *type, int owner, C_word **space);
|
||||
|
||||
/* generate an error message and halt */
|
||||
SWIGIMPORT(void) SWIG_Chicken_Barf(int code, C_char *msg, ...);
|
||||
#else
|
||||
|
||||
SWIGRUNTIME(char *)
|
||||
static char *
|
||||
SWIG_Chicken_MakeString(C_word str) {
|
||||
char *ret;
|
||||
size_t l;
|
||||
|
|
@ -94,6 +74,17 @@ SWIG_Chicken_MakeString(C_word str) {
|
|||
return ret;
|
||||
}
|
||||
|
||||
static C_word SWIG_Chicken_LookupSymbol(char *name, C_SYMBOL_TABLE *stable) {
|
||||
C_word *a = C_alloc(C_SIZEOF_STRING (strlen (name)));
|
||||
C_word n = C_string2(&a, name);
|
||||
C_word sym = C_find_symbol(n, stable);
|
||||
if (C_truep(sym)) {
|
||||
return C_symbol_value(sym);
|
||||
} else {
|
||||
return C_SCHEME_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
/* Just a helper function. Do not export it */
|
||||
static void SWIG_Chicken_Panic (C_char *) C_noret;
|
||||
static void SWIG_Chicken_Panic (C_char *msg)
|
||||
|
|
@ -104,9 +95,9 @@ static void SWIG_Chicken_Panic (C_char *msg)
|
|||
exit (5); /* should never get here */
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Chicken_Barf(int code, C_char *msg, ...) C_noret;
|
||||
SWIGRUNTIME(void)
|
||||
static void
|
||||
SWIG_Chicken_Barf(int code, C_char *msg, ...)
|
||||
{
|
||||
char *errorhook = C_text("\003syserror-hook");
|
||||
|
|
@ -166,7 +157,7 @@ SWIG_Chicken_Barf(int code, C_char *msg, ...)
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(C_word)
|
||||
static inline C_word
|
||||
SWIG_Chicken_NewPointerObj(void *ptr, swig_type_info *type, int owner, C_word **data)
|
||||
{
|
||||
if (ptr == NULL)
|
||||
|
|
@ -176,7 +167,7 @@ SWIG_Chicken_NewPointerObj(void *ptr, swig_type_info *type, int owner, C_word **
|
|||
}
|
||||
|
||||
/* Return 0 if successful. */
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_Chicken_ConvertPtr(C_word s, void **result, swig_type_info *type, int flags)
|
||||
{
|
||||
swig_type_info *cast;
|
||||
|
|
@ -204,7 +195,7 @@ SWIG_Chicken_ConvertPtr(C_word s, void **result, swig_type_info *type, int flags
|
|||
return 1;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_Chicken_MustGetPtr (C_word s, swig_type_info *type, int argnum, int flags)
|
||||
{
|
||||
void *result;
|
||||
|
|
@ -216,15 +207,6 @@ SWIG_Chicken_MustGetPtr (C_word s, swig_type_info *type, int argnum, int flags)
|
|||
return result;
|
||||
}
|
||||
|
||||
/*
|
||||
SWIGRUNTIME(void)
|
||||
SWIG_Chicken_Init ()
|
||||
{
|
||||
}*/
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -33,34 +33,50 @@ extern "C" {
|
|||
#define MAXVALUES 6
|
||||
#define swig_make_boolean(b) (b ? scheme_true : scheme_false)
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(void) SWIG_MzScheme_Init();
|
||||
/* If there is a type-mismatch, return nonzero; on success, return 0. */
|
||||
SWIGIMPORT(int) SWIG_MzScheme_ConvertPtr(Scheme_Object *s, void **result, swig_type_info *type, int flags);
|
||||
/* If there is a type-mismatch, signal a wrong-type-arg error for the given argument number. */
|
||||
SWIGIMPORT(void *) SWIG_MzScheme_MustGetPtr(Scheme_Object *s, swig_type_info *type,
|
||||
int argnum, int flags, const char *func_name,
|
||||
int argc, Scheme_Object **argv);
|
||||
SWIGIMPORT(Scheme_Object *) SWIG_MzScheme_NewPointerObj(void *ptr, swig_type_info *type, int owner);
|
||||
SWIGIMPORT(void *) SWIG_MzScheme_Malloc(size_t size, const char *func_name);
|
||||
SWIGIMPORT(Scheme_Object *) SWIG_MzScheme_PackageValues(int num, Scheme_Object **values);
|
||||
SWIGIMPORT(Scheme_Object *)
|
||||
SWIG_MzScheme_new_scheme_struct (Scheme_Env* env, const char* basename,
|
||||
int num_fields, char** field_names);
|
||||
|
||||
#else
|
||||
|
||||
struct swig_mz_proxy {
|
||||
Scheme_Type mztype;
|
||||
swig_type_info *type;
|
||||
void *object;
|
||||
};
|
||||
|
||||
static Scheme_Type swig_type;
|
||||
static int swig_mz_initialized = 0;
|
||||
/* The interpreter will store a pointer to this structure in a global
|
||||
variable called swig-runtime-data-type-pointer. The instance of this
|
||||
struct is only used if no other module has yet been loaded */
|
||||
struct swig_mzscheme_runtime_data {
|
||||
swig_type_info **handle;
|
||||
Scheme_Type type;
|
||||
};
|
||||
static struct swig_mzscheme_runtime_data swig_mzscheme_runtime_data;
|
||||
|
||||
static void mz_free_swig(void *p, void *data) {
|
||||
static Scheme_Type swig_type;
|
||||
|
||||
static void
|
||||
SWIG_MzScheme_LookupTypePointer(Scheme_Env *env) {
|
||||
Scheme_Object *pointer, *symbol;
|
||||
struct swig_mzscheme_runtime_data *data;
|
||||
|
||||
/* first check if pointer already created */
|
||||
symbol = scheme_intern_symbol("swig-runtime-data-type-pointer");
|
||||
pointer = scheme_lookup_global(symbol, env);
|
||||
if (pointer && SCHEME_CPTRP(pointer)) {
|
||||
data = (struct swig_mzscheme_runtime_data *) SCHEME_CPTR_VAL(pointer);
|
||||
swig_type_list_handle = data->handle;
|
||||
swig_type = data->type;
|
||||
} else {
|
||||
/* create a new type for wrapped pointer values */
|
||||
swig_type = scheme_make_type((char *)"swig");
|
||||
swig_mzscheme_runtime_data.handle = swig_type_list_handle;
|
||||
swig_mzscheme_runtime_data.type = swig_type;
|
||||
|
||||
/* create a new pointer */
|
||||
pointer = scheme_make_cptr((void *) &swig_mzscheme_runtime_data, "swig_mzscheme_runtime_data");
|
||||
scheme_add_global_symbol(symbol, pointer, env);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
mz_free_swig(void *p, void *data) {
|
||||
struct swig_mz_proxy *proxy = (struct swig_mz_proxy *) p;
|
||||
if (SCHEME_NULLP((Scheme_Object*)p) || SCHEME_TYPE((Scheme_Object*)p) != swig_type)
|
||||
return;
|
||||
|
|
@ -71,7 +87,7 @@ static void mz_free_swig(void *p, void *data) {
|
|||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(Scheme_Object *)
|
||||
static Scheme_Object *
|
||||
SWIG_MzScheme_NewPointerObj(void *ptr, swig_type_info *type, int owner) {
|
||||
struct swig_mz_proxy *new_proxy;
|
||||
new_proxy = (struct swig_mz_proxy *) scheme_malloc(sizeof(struct swig_mz_proxy));
|
||||
|
|
@ -84,7 +100,7 @@ SWIG_MzScheme_NewPointerObj(void *ptr, swig_type_info *type, int owner) {
|
|||
return (Scheme_Object *) new_proxy;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(int)
|
||||
static int
|
||||
SWIG_MzScheme_ConvertPtr(Scheme_Object *s, void **result, swig_type_info *type, int flags) {
|
||||
swig_type_info *cast;
|
||||
|
||||
|
|
@ -109,7 +125,7 @@ SWIG_MzScheme_ConvertPtr(Scheme_Object *s, void **result, swig_type_info *type,
|
|||
return 1;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_MzScheme_MustGetPtr(Scheme_Object *s, swig_type_info *type,
|
||||
int argnum, int flags, const char *func_name,
|
||||
int argc, Scheme_Object **argv) {
|
||||
|
|
@ -120,15 +136,7 @@ SWIG_MzScheme_MustGetPtr(Scheme_Object *s, swig_type_info *type,
|
|||
return result;
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void)
|
||||
SWIG_MzScheme_Init() {
|
||||
if (!swig_mz_initialized) {
|
||||
swig_type = scheme_make_type((char *)"swig");
|
||||
swig_mz_initialized = 1;
|
||||
}
|
||||
}
|
||||
|
||||
SWIGRUNTIME(void *)
|
||||
static inline void *
|
||||
SWIG_MzScheme_Malloc(size_t size, const char *func_name) {
|
||||
void *p = malloc(size);
|
||||
if (p == NULL) {
|
||||
|
|
@ -136,7 +144,7 @@ SWIG_MzScheme_Malloc(size_t size, const char *func_name) {
|
|||
} else return p;
|
||||
}
|
||||
|
||||
SWIGIMPORT(Scheme_Object *)
|
||||
static inline Scheme_Object *
|
||||
SWIG_MzScheme_PackageValues(int num, Scheme_Object **values) {
|
||||
/* ignore first value if void */
|
||||
if (num > 0 && SCHEME_VOIDP(values[0]))
|
||||
|
|
@ -152,7 +160,7 @@ SWIG_MzScheme_PackageValues(int num, Scheme_Object **values) {
|
|||
#endif
|
||||
|
||||
/* Function to create a new struct. */
|
||||
SWIGRUNTIME(Scheme_Object *)
|
||||
static Scheme_Object *
|
||||
SWIG_MzScheme_new_scheme_struct (Scheme_Env* env, const char* basename,
|
||||
int num_fields, char** field_names)
|
||||
{
|
||||
|
|
@ -185,8 +193,6 @@ SWIG_MzScheme_new_scheme_struct (Scheme_Env* env, const char* basename,
|
|||
return new_type;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -27,10 +27,10 @@
|
|||
|
||||
if (!_swig_init) {
|
||||
int i;
|
||||
SWIG_MzScheme_LookupTypePointer(env);
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
_swig_init = 1;
|
||||
}
|
||||
SWIG_MzScheme_Init();
|
||||
%}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,24 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg" // common type checking code
|
||||
%runtime "perlrun.swg" // Perl runtime functions
|
||||
%runtime "noembed.h" // undefine Perl5 macros
|
||||
|
|
@ -584,6 +602,9 @@ XS(SWIG_init) {
|
|||
int i;
|
||||
static int _init = 0;
|
||||
if (!_init) {
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
SWIG_Perl_LookupTypePointer();
|
||||
#endif
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -170,6 +170,21 @@ extern "C" {
|
|||
# define SWIG_MAYBE_PERL_OBJECT
|
||||
#endif
|
||||
|
||||
/* load the swig_runtime_list_handle variable from the interpreter */
|
||||
static void SWIG_Perl_LookupTypePointer() {
|
||||
SV *pointer;
|
||||
|
||||
/* first check if pointer already created */
|
||||
pointer = get_sv("swig_runtime_data::type_pointer", FALSE);
|
||||
if (pointer && SvOK(pointer)) {
|
||||
swig_type_list_handle = INT2PTR(swig_type_info **, SvIV(pointer));
|
||||
} else {
|
||||
/* create a new pointer */
|
||||
pointer = get_sv("swig_runtime_data::type_pointer", TRUE);
|
||||
sv_setiv(pointer, PTR2IV(swig_type_list_handle));
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(int) SWIG_Perl_ConvertPtr(SWIG_MAYBE_PERL_OBJECT SV *, void **, swig_type_info *, int flags);
|
||||
|
|
|
|||
|
|
@ -6,13 +6,37 @@
|
|||
|
||||
%runtime "rubyhead.swg"
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg"
|
||||
|
||||
%insert(runtime) %{
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
%}
|
||||
%runtime "rubydec.swg"
|
||||
%insert(runtime) %{
|
||||
#else
|
||||
%}
|
||||
%runtime "rubydef.swg"
|
||||
%insert(runtime) %{
|
||||
#endif
|
||||
%}
|
||||
|
||||
#define %alias %feature("alias")
|
||||
#define %freefunc %feature("freefunc")
|
||||
|
|
|
|||
|
|
@ -5,14 +5,31 @@ extern "C" {
|
|||
|
||||
static VALUE _mSWIG = Qnil;
|
||||
static VALUE _cSWIG_Pointer = Qnil;
|
||||
static VALUE swig_runtime_data_type_pointer = Qnil;
|
||||
|
||||
/* Initialize Ruby runtime support */
|
||||
SWIGRUNTIME(void)
|
||||
SWIG_Ruby_InitRuntime(void)
|
||||
{
|
||||
VALUE pointer;
|
||||
|
||||
if (_mSWIG == Qnil) {
|
||||
_mSWIG = rb_define_module("SWIG");
|
||||
}
|
||||
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
/* first check if pointer already created */
|
||||
pointer = rb_gv_get("$swig_runtime_data_type_pointer");
|
||||
if (pointer != Qnil) {
|
||||
Data_Get_Struct(pointer, swig_type_info *, swig_type_list_handle);
|
||||
} else {
|
||||
/* register a new class */
|
||||
VALUE cl = rb_define_class("swig_runtime_data", rb_cObject);
|
||||
/* create and store the structure pointer to a global variable */
|
||||
swig_runtime_data_type_pointer = Data_Wrap_Struct(cl, 0, 0, swig_type_list_handle);
|
||||
rb_define_readonly_variable("$swig_runtime_data_type_pointer", &swig_runtime_data_type_pointer);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/* Define Ruby class for C type */
|
||||
|
|
|
|||
|
|
@ -104,6 +104,24 @@ typedef struct swig_instance {
|
|||
#define SWIG_MethodCommand SWIG_Tcl_MethodCommand
|
||||
#define SWIG_ObjectDelete SWIG_Tcl_ObjectDelete
|
||||
|
||||
static void
|
||||
SWIG_Tcl_LookupTypePointer(Tcl_Interp *interp) {
|
||||
char buf[512];
|
||||
char *data;
|
||||
|
||||
/* first check if pointer already created */
|
||||
data = (char *) Tcl_GetVar(interp, "swig_runtime_data_type_pointer", TCL_GLOBAL_ONLY);
|
||||
if (data) {
|
||||
SWIG_UnpackData(data, &swig_type_list_handle, sizeof(swig_type_info **));
|
||||
} else {
|
||||
/* create a new pointer */
|
||||
data = SWIG_PackData(buf, &swig_type_list_handle, sizeof(swig_type_info **));
|
||||
*data = 0;
|
||||
Tcl_SetVar(interp, "swig_runtime_data_type_pointer", buf, 0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
|
||||
SWIGIMPORT(int) SWIG_Tcl_ConvertPtrFromString(Tcl_Interp *, char *, void **, swig_type_info *,int flags);
|
||||
|
|
|
|||
|
|
@ -5,6 +5,24 @@
|
|||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
%runtime "precommon.swg"
|
||||
%insert(runtime) %{
|
||||
|
||||
#ifndef SWIG_ALLOW_RUNTIME
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Disable runtime library use, everything is used as static
|
||||
* ----------------------------------------------------------------------------- */
|
||||
#ifndef SWIG_DISABLE_RUNTIME
|
||||
#define SWIG_DISABLE_RUNTIME
|
||||
#endif
|
||||
#ifdef SWIG_GLOBAL
|
||||
#undef SWIG_GLOBAL
|
||||
#endif
|
||||
#ifdef SWIG_NOINCLUDE
|
||||
#undef SWIG_NOINCLUDE
|
||||
#endif
|
||||
#endif /* SWIG_ALLOW_RUNTIME */
|
||||
|
||||
%}
|
||||
%runtime "common.swg"
|
||||
%runtime "swigtcl8.swg"
|
||||
|
||||
|
|
@ -646,6 +664,9 @@ SWIGEXPORT(int) SWIG_init(Tcl_Interp *interp) {
|
|||
Tcl_Eval(interp, "namespace eval " SWIG_namespace " { }");
|
||||
#endif
|
||||
if (!_init) {
|
||||
#ifdef SWIG_DISABLE_RUNTIME
|
||||
SWIG_Tcl_LookupTypePointer(interp);
|
||||
#endif
|
||||
for (i = 0; swig_types_initial[i]; i++) {
|
||||
swig_types[i] = SWIG_TypeRegister(swig_types_initial[i]);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -230,10 +230,6 @@ CHICKEN::top(Node *n)
|
|||
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n");
|
||||
Swig_banner(f_runtime);
|
||||
|
||||
if (NoInclude) {
|
||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
||||
}
|
||||
|
||||
/* Set module name */
|
||||
realmodule = Copy(Getattr(n,"name"));
|
||||
module = Copy(realmodule);
|
||||
|
|
@ -390,10 +386,10 @@ CHICKEN::top(Node *n)
|
|||
int
|
||||
CHICKEN::importDirective(Node *n)
|
||||
{
|
||||
String *modname = Getattr(n,"module");
|
||||
/*String *modname = Getattr(n,"module");
|
||||
if (modname) {
|
||||
Printf(f_scm,"(declare (uses %s))\n", modname);
|
||||
}
|
||||
}*/
|
||||
return Language::importDirective(n);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -149,10 +149,6 @@ public:
|
|||
Printf(f_runtime, "/* -*- buffer-read-only: t -*- vi: set ro: */\n");
|
||||
Swig_banner (f_runtime);
|
||||
|
||||
if (NoInclude) {
|
||||
Printf(f_runtime, "#define SWIG_NOINCLUDE\n");
|
||||
}
|
||||
|
||||
module = Getattr(n,"name");
|
||||
|
||||
Language::top(n);
|
||||
|
|
@ -583,7 +579,7 @@ public:
|
|||
|
||||
// Make a static variable;
|
||||
|
||||
Printf (var_name, "_wrap_const_%s", Swig_name_mangle(iname));
|
||||
Printf (var_name, "_wrap_const_%s", Swig_name_mangle(Getattr(n,"sym:name")));
|
||||
|
||||
// Build the name for scheme.
|
||||
Printv(proc_name, iname,NIL);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue