Skip to content

Commit

Permalink
Variable name change to remove confusion in preparation for a future …
Browse files Browse the repository at this point in the history
…commit

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11866 626c5289-ae23-0410-ae9c-e8d60b6d4f22
  • Loading branch information
wsfulton committed Feb 23, 2010
1 parent d64d31a commit b966af2
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions Source/Modules/tcl8.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ static String *methods_tab = 0; /* Methods table */
static String *attr_tab = 0; /* Attribute table */
static String *prefix = 0;
static String *module = 0;
static int nspace = 0;
static int namespace_option = 0;
static String *init_name = 0;
static String *ns_name = 0;
static int have_constructor;
Expand Down Expand Up @@ -97,7 +97,7 @@ class TCL8:public Language {
i++;
}
} else if (strcmp(argv[i], "-namespace") == 0) {
nspace = 1;
namespace_option = 1;
Swig_mark_arg(i);
} else if (strcmp(argv[i], "-itcl") == 0) {
itcl = 1;
Expand Down Expand Up @@ -204,7 +204,7 @@ class TCL8:public Language {

Printf(f_header, "#define SWIG_init %s\n", init_name);
Printf(f_header, "#define SWIG_name \"%s\"\n", module);
if (nspace) {
if (namespace_option) {
Printf(f_header, "#define SWIG_prefix \"%s::\"\n", ns_name);
Printf(f_header, "#define SWIG_namespace \"%s\"\n\n", ns_name);
} else {
Expand Down Expand Up @@ -666,15 +666,15 @@ class TCL8:public Language {
virtual int constantWrapper(Node *n) {
String *name = Getattr(n, "name");
String *iname = Getattr(n, "sym:name");
String *nsname = !nspace ? Copy(iname) : NewStringf("%s::%s", ns_name, iname);
String *nsname = !namespace_option ? Copy(iname) : NewStringf("%s::%s", ns_name, iname);
SwigType *type = Getattr(n, "type");
String *rawval = Getattr(n, "rawval");
String *value = rawval ? rawval : Getattr(n, "value");
String *tm;

if (!addSymbol(iname, n))
return SWIG_ERROR;
if (nspace)
if (namespace_option)
Setattr(n, "sym:name", nsname);

/* Special hook for member pointer */
Expand Down Expand Up @@ -865,7 +865,7 @@ class TCL8:public Language {
Printv(ptrclass, attributes, NIL);

// base class swig_getset was being called for complex inheritance trees
if (nspace) {
if (namespace_option) {

Printv(ptrclass, " protected method ", class_name, "_swig_getset {var name1 name2 op} {\n", NIL);

Expand Down Expand Up @@ -1018,7 +1018,7 @@ class TCL8:public Language {

if (Len(dv) > 0) {
String *defval = NewString(dv);
if (nspace) {
if (namespace_option) {
Insert(defval, 0, "::");
Insert(defval, 0, ns_name);
}
Expand All @@ -1036,7 +1036,7 @@ class TCL8:public Language {
}
Printv(imethods, "] ", NIL);

if (nspace) {
if (namespace_option) {
Printv(imethods, "{ ", ns_name, "::", class_name, "_", realname, " $swigobj", NIL);
} else {
Printv(imethods, "{ ", class_name, "_", realname, " $swigobj", NIL);
Expand Down Expand Up @@ -1164,7 +1164,7 @@ class TCL8:public Language {
// Call to constructor wrapper and parent Ptr class
// [BRE] add -namespace/-prefix support

if (nspace) {
if (namespace_option) {
Printv(constructor, " ", realname, "Ptr::constructor [", ns_name, "::new_", realname, NIL);
} else {
Printv(constructor, " ", realname, "Ptr::constructor [new_", realname, NIL);
Expand Down Expand Up @@ -1231,7 +1231,7 @@ class TCL8:public Language {
if (!temp)
temp = NewString("");
Clear(temp);
if (nspace) {
if (namespace_option) {
Printf(temp, "%s::%s ", ns_name, iname);
} else {
Printf(temp, "%s ", iname);
Expand Down

0 comments on commit b966af2

Please sign in to comment.