diff --git a/Lib/exception.i b/Lib/exception.i index ff806ed08..1d6a9e35e 100644 --- a/Lib/exception.i +++ b/Lib/exception.i @@ -167,7 +167,7 @@ static void _SWIG_exception(int code, char *msg) { #undef MAP } -#define SWIG_exception(a,b) _SWIG_exception(a, b, SCHEME_NAME) +#define SWIG_exception(a,b) _SWIG_exception(a, b, FUNC_NAME) %} #endif diff --git a/Source/Modules1.1/guile.cxx b/Source/Modules1.1/guile.cxx index 8406488aa..837693176 100644 --- a/Source/Modules1.1/guile.cxx +++ b/Source/Modules1.1/guile.cxx @@ -588,12 +588,9 @@ GUILE::create_function (char *name, char *iname, SwigType *d, ParmList *l) Printv(signature, ")\n", 0); Printf(f->def, ")\n{\n"); - /* Define the scheme name in C */ - /* FIXME: This is only needed for the code in exception.i since - typemaps can always use $name. I propose to define a new macro - SWIG_exception_in(ERROR, MESSAGE, FUNCTION) and use it instead of - SWIG_exception(ERROR, MESSAGE). */ - Printv(f->def, "#define SCHEME_NAME \"", proc_name, "\"\n", 0); + /* Define the scheme name in C. This define is used by several Guile + macros. */ + Printv(f->def, "#define FUNC_NAME \"", proc_name, "\"\n", 0); // Now write code to make the function call Printv(f->code, tab4, "gh_defer_ints();\n", 0); @@ -644,7 +641,7 @@ GUILE::create_function (char *name, char *iname, SwigType *d, ParmList *l) // Undefine the scheme name - Printf(f->code, "#undef SCHEME_NAME\n"); + Printf(f->code, "#undef FUNC_NAME\n"); Printf(f->code, "}\n"); Wrapper_print (f, f_wrappers);