From 6e4e6f35982a344dbbd1f50ff06ce37bb019620d Mon Sep 17 00:00:00 2001 From: Thien-Thi Nguyen Date: Thu, 20 Jul 2000 19:49:28 +0000 Subject: [PATCH] (GUILE::close): Fix bug: Use "swig" for `module_name' if unset. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@584 626c5289-ae23-0410-ae9c-e8d60b6d4f22 --- Source/Modules1.1/guile.cxx | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/Source/Modules1.1/guile.cxx b/Source/Modules1.1/guile.cxx index b4f12d23a..0017a146f 100644 --- a/Source/Modules1.1/guile.cxx +++ b/Source/Modules1.1/guile.cxx @@ -20,7 +20,7 @@ static char cvsroot[] = "$Header$"; * * guile.cxx * - * Definitions for adding functions to Guile 3.0 + * Definitions for adding functions to Guile ***********************************************************************/ #include "mod11.h" @@ -328,11 +328,14 @@ GUILE::close (void) Printf (f_init, "}\n\n"); char module_name[256]; - if (package) - sprintf(module_name,"%s/%s", package,module); - else - strcpy(module_name,module); - + if (!module) + sprintf(module_name, "swig"); + else { + if (package) + sprintf(module_name,"%s/%s", package,module); + else + strcpy(module_name,module); + } emit_linkage (module_name); } @@ -785,7 +788,7 @@ GUILE::declare_const (char *name, char *, DataType *type, char *value) void GUILE::usage_var (char *iname, DataType *t, DOHString *usage) { - + Printv(usage, "(", iname, " [value])", 0); if (!((t->type != T_USER) || (t->is_pointer))) { Printf(usage," - unsupported");