summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam S Fulton <wsf@fultondesigns.co.uk>2008-02-27 15:29:55 +0000
committerWilliam S Fulton <wsf@fultondesigns.co.uk>2008-02-27 15:29:55 +0000
commit2bef4d6b0cb8ebb4cd7e703a7ba9d280bc613767 (patch)
tree50bddee5b9967938fca03f0d6347867cd26adfa5
parent9c5610a8e9577d05eba5784c86a62e52e7cd17e2 (diff)
downloadswig-2bef4d6b0cb8ebb4cd7e703a7ba9d280bc613767.tar.gz
Set wrap:name for variables for use in special variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
-rw-r--r--Source/Modules/chicken.cxx3
-rw-r--r--Source/Modules/guile.cxx1
-rw-r--r--Source/Modules/mzscheme.cxx1
-rwxr-xr-xSource/Modules/ocaml.cxx1
-rw-r--r--Source/Modules/perl5.cxx2
-rw-r--r--Source/Modules/python.cxx2
-rw-r--r--Source/Modules/ruby.cxx2
-rw-r--r--Source/Modules/tcl8.cxx2
8 files changed, 14 insertions, 0 deletions
diff --git a/Source/Modules/chicken.cxx b/Source/Modules/chicken.cxx
index f6497ef2f..a908d9b52 100644
--- a/Source/Modules/chicken.cxx
+++ b/Source/Modules/chicken.cxx
@@ -709,6 +709,8 @@ int CHICKEN::variableWrapper(Node *n) {
if (overname) {
Append(wname, overname);
}
+ Setattr(n, "wrap:name", wname);
+
// Check for interrupts
Printv(f->code, "C_trace(\"", scmname, "\");\n", NIL);
@@ -907,6 +909,7 @@ int CHICKEN::constantWrapper(Node *n) {
if (1 || (SwigType_type(t) != T_USER) || (isPointer(t))) {
+ Setattr(n, "wrap:name", wname);
Printv(f->def, "static ", "void ", wname, "(C_word, C_word, C_word) C_noret;\n", NIL);
Printv(f->def, "static ", "void ", wname, "(C_word argc, C_word closure, " "C_word continuation) {\n", NIL);
diff --git a/Source/Modules/guile.cxx b/Source/Modules/guile.cxx
index 7f8ee86b6..95633410f 100644
--- a/Source/Modules/guile.cxx
+++ b/Source/Modules/guile.cxx
@@ -1162,6 +1162,7 @@ public:
// Build the name for scheme.
proc_name = NewString(iname);
Replaceall(proc_name, "_", "-");
+ Setattr(n, "wrap:name", proc_name);
if (1 || (SwigType_type(t) != T_USER) || (is_a_pointer(t))) {
diff --git a/Source/Modules/mzscheme.cxx b/Source/Modules/mzscheme.cxx
index 71c355df4..e308aa30d 100644
--- a/Source/Modules/mzscheme.cxx
+++ b/Source/Modules/mzscheme.cxx
@@ -522,6 +522,7 @@ public:
// Build the name for scheme.
Printv(proc_name, iname, NIL);
Replaceall(proc_name, "_", "-");
+ Setattr(n, "wrap:name", proc_name);
if ((SwigType_type(t) != T_USER) || (is_a_pointer(t))) {
diff --git a/Source/Modules/ocaml.cxx b/Source/Modules/ocaml.cxx
index 42283dfa8..45b5bc9da 100755
--- a/Source/Modules/ocaml.cxx
+++ b/Source/Modules/ocaml.cxx
@@ -795,6 +795,7 @@ public:
// Build the name for scheme.
Printv(proc_name, iname, NIL);
+ Setattr(n, "wrap:name", proc_name);
Printf(f->def, "SWIGEXT CAML_VALUE %s(CAML_VALUE args) {\n", var_name);
// Printv(f->def, "#define FUNC_NAME \"", proc_name, "\"", NIL);
diff --git a/Source/Modules/perl5.cxx b/Source/Modules/perl5.cxx
index 67192959b..7a057901d 100644
--- a/Source/Modules/perl5.cxx
+++ b/Source/Modules/perl5.cxx
@@ -782,6 +782,7 @@ public:
/* Create a Perl function for setting the variable value */
if (!GetFlag(n, "feature:immutable")) {
+ Setattr(n, "wrap:name", set_name);
Printf(setf->def, "SWIGCLASS_STATIC int %s(pTHX_ SV* sv, MAGIC * SWIGUNUSEDPARM(mg)) {\n", set_name);
Printv(setf->code, tab4, "MAGIC_PPERL\n", NIL);
@@ -804,6 +805,7 @@ public:
}
/* Now write a function to evaluate the variable */
+ Setattr(n, "wrap:name", get_name);
int addfail = 0;
Printf(getf->def, "SWIGCLASS_STATIC int %s(pTHX_ SV *sv, MAGIC *SWIGUNUSEDPARM(mg)) {\n", get_name);
Printv(getf->code, tab4, "MAGIC_PPERL\n", NIL);
diff --git a/Source/Modules/python.cxx b/Source/Modules/python.cxx
index a09ee4761..2a88a5019 100644
--- a/Source/Modules/python.cxx
+++ b/Source/Modules/python.cxx
@@ -2178,6 +2178,7 @@ public:
/* Create a function for setting the value of the variable */
if (assignable) {
+ Setattr(n, "wrap:name", varsetname);
Printf(setf->def, "SWIGINTERN int %s(PyObject *_val) {", varsetname);
if ((tm = Swig_typemap_lookup_new("varin", n, name, 0))) {
Replaceall(tm, "$source", "_val");
@@ -2208,6 +2209,7 @@ public:
Wrapper_print(setf, f_wrappers);
/* Create a function for getting the value of a variable */
+ Setattr(n, "wrap:name", vargetname);
int addfail = 0;
Printf(getf->def, "SWIGINTERN PyObject *%s(void) {", vargetname);
Wrapper_add_local(getf, "pyobj", "PyObject *pyobj = 0");
diff --git a/Source/Modules/ruby.cxx b/Source/Modules/ruby.cxx
index dd20692ff..7ac4e70b8 100644
--- a/Source/Modules/ruby.cxx
+++ b/Source/Modules/ruby.cxx
@@ -2096,6 +2096,7 @@ public:
int addfail = 0;
String *getname = Swig_name_get(iname);
getfname = Swig_name_wrapper(getname);
+ Setattr(n, "wrap:name", getfname);
Printv(getf->def, "SWIGINTERN VALUE\n", getfname, "(", NIL);
Printf(getf->def, "VALUE self");
Printf(getf->def, ") {");
@@ -2130,6 +2131,7 @@ public:
String *setname = Swig_name_set(iname);
setfname = Swig_name_wrapper(setname);
+ Setattr(n, "wrap:name", setfname);
Printv(setf->def, "SWIGINTERN VALUE\n", setfname, "(VALUE self, ", NIL);
Printf(setf->def, "VALUE _val) {");
tm = Swig_typemap_lookup_new("varin", n, name, 0);
diff --git a/Source/Modules/tcl8.cxx b/Source/Modules/tcl8.cxx
index eea979378..4e76074a4 100644
--- a/Source/Modules/tcl8.cxx
+++ b/Source/Modules/tcl8.cxx
@@ -562,6 +562,7 @@ public:
getf = NewWrapper();
String *getname = Swig_name_get(iname);
String *getfname = Swig_name_wrapper(getname);
+ Setattr(n, "wrap:name", getfname);
Printv(getf->def, "SWIGINTERN const char *", getfname, "(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2, int flags) {", NIL);
Wrapper_add_local(getf, "value", "Tcl_Obj *value = 0");
if ((tm = Swig_typemap_lookup_new("varout", n, name, 0))) {
@@ -593,6 +594,7 @@ public:
setf = NewWrapper();
setname = Swig_name_set(iname);
setfname = Swig_name_wrapper(setname);
+ Setattr(n, "wrap:name", setfname);
if (setf) {
Printv(setf->def, "SWIGINTERN const char *", setfname,
"(ClientData clientData SWIGUNUSED, Tcl_Interp *interp, char *name1, char *name2 SWIGUNUSED, int flags) {", NIL);