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
This commit is contained in:
William S Fulton 2008-02-27 15:29:55 +00:00
commit 2bef4d6b0c
8 changed files with 14 additions and 0 deletions

View file

@ -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");