Define a local variable for sym:name attribute
No changes, this is just a tiny simplification.
This commit is contained in:
parent
e2d32f33b2
commit
f9b4ea2841
1 changed files with 5 additions and 3 deletions
|
|
@ -499,6 +499,8 @@ public:
|
||||||
if (!cxx_wrappers_.is_initialized())
|
if (!cxx_wrappers_.is_initialized())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
String* const classname = Getattr(n, "sym:name");
|
||||||
|
|
||||||
scoped_dohptr base_classes(NewStringEmpty());
|
scoped_dohptr base_classes(NewStringEmpty());
|
||||||
if (List *baselist = Getattr(n, "bases")) {
|
if (List *baselist = Getattr(n, "bases")) {
|
||||||
for (Iterator i = First(baselist); i.item; i = Next(i)) {
|
for (Iterator i = First(baselist); i.item; i = Next(i)) {
|
||||||
|
|
@ -508,7 +510,7 @@ public:
|
||||||
if (first_base_) {
|
if (first_base_) {
|
||||||
Swig_warning(WARN_C_UNSUPPORTTED, Getfile(n), Getline(n),
|
Swig_warning(WARN_C_UNSUPPORTTED, Getfile(n), Getline(n),
|
||||||
"Multiple inheritance not supported yet, skipping C++ wrapper generation for %s\n",
|
"Multiple inheritance not supported yet, skipping C++ wrapper generation for %s\n",
|
||||||
Getattr(n, "sym:name")
|
classname
|
||||||
);
|
);
|
||||||
|
|
||||||
// Return before initializing class_node_, so that the dtor won't output anything neither.
|
// Return before initializing class_node_, so that the dtor won't output anything neither.
|
||||||
|
|
@ -522,12 +524,12 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
Printv(cxx_wrappers_.sect_types,
|
Printv(cxx_wrappers_.sect_types,
|
||||||
"class ", Getattr(n, "sym:name"), ";\n",
|
"class ", classname, ";\n",
|
||||||
NIL
|
NIL
|
||||||
);
|
);
|
||||||
|
|
||||||
Printv(cxx_wrappers_.sect_decls,
|
Printv(cxx_wrappers_.sect_decls,
|
||||||
"class ", Getattr(n, "sym:name"), base_classes.get(), " {\n"
|
"class ", classname, base_classes.get(), " {\n"
|
||||||
"public:",
|
"public:",
|
||||||
NIL
|
NIL
|
||||||
);
|
);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue