hoist globals to local scope where trival.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
adf1e5373d
commit
b9a88dec5a
1 changed files with 4 additions and 4 deletions
|
|
@ -100,8 +100,6 @@ static int have_constructor = 0;
|
||||||
static int have_destructor = 0;
|
static int have_destructor = 0;
|
||||||
static int have_data_members = 0;
|
static int have_data_members = 0;
|
||||||
static String *class_name = 0; /* Name of the class (what Perl thinks it is) */
|
static String *class_name = 0; /* Name of the class (what Perl thinks it is) */
|
||||||
static String *real_classname = 0; /* Real name of C/C++ class */
|
|
||||||
static String *fullclassname = 0;
|
|
||||||
|
|
||||||
static String *pcode = 0; /* Perl code associated with each class */
|
static String *pcode = 0; /* Perl code associated with each class */
|
||||||
/* static String *blessedmembers = 0; *//* Member data associated with each class */
|
/* static String *blessedmembers = 0; *//* Member data associated with each class */
|
||||||
|
|
@ -1186,6 +1184,8 @@ public:
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
|
|
||||||
virtual int classHandler(Node *n) {
|
virtual int classHandler(Node *n) {
|
||||||
|
String *name = 0; /* Real name of C/C++ class */
|
||||||
|
String *fullclassname = 0;
|
||||||
|
|
||||||
if (blessed) {
|
if (blessed) {
|
||||||
have_constructor = 0;
|
have_constructor = 0;
|
||||||
|
|
@ -1205,7 +1205,7 @@ public:
|
||||||
} else {
|
} else {
|
||||||
fullclassname = NewString(class_name);
|
fullclassname = NewString(class_name);
|
||||||
}
|
}
|
||||||
real_classname = Getattr(n, "name");
|
name = Getattr(n, "name");
|
||||||
pcode = NewString("");
|
pcode = NewString("");
|
||||||
// blessedmembers = NewString("");
|
// blessedmembers = NewString("");
|
||||||
}
|
}
|
||||||
|
|
@ -1217,7 +1217,7 @@ public:
|
||||||
/* Finish the rest of the class */
|
/* Finish the rest of the class */
|
||||||
if (blessed) {
|
if (blessed) {
|
||||||
/* Generate a client-data entry */
|
/* Generate a client-data entry */
|
||||||
SwigType *ct = NewStringf("p.%s", real_classname);
|
SwigType *ct = NewStringf("p.%s", name);
|
||||||
Printv(f_init, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct), ", (void*) \"", fullclassname, "\");\n", NIL);
|
Printv(f_init, "SWIG_TypeClientData(SWIGTYPE", SwigType_manglestr(ct), ", (void*) \"", fullclassname, "\");\n", NIL);
|
||||||
SwigType_remember(ct);
|
SwigType_remember(ct);
|
||||||
Delete(ct);
|
Delete(ct);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue