[Go] Adjust last change to always emit a destructor.
This commit is contained in:
parent
5bca063536
commit
38c7d59f81
1 changed files with 29 additions and 28 deletions
|
|
@ -3891,37 +3891,38 @@ private:
|
|||
String *director_struct_name = NewString("_swig_Director");
|
||||
Append(director_struct_name, cn);
|
||||
|
||||
if (!is_ignored) {
|
||||
Printv(f_c_directors_h, " virtual ~SwigDirector_", class_name, "()", NULL);
|
||||
Printv(f_c_directors_h, " virtual ~SwigDirector_", class_name, "()", NULL);
|
||||
|
||||
String *throws = buildThrow(n);
|
||||
if (throws) {
|
||||
Printv(f_c_directors_h, " ", throws, NULL);
|
||||
}
|
||||
|
||||
Printv(f_c_directors_h, ";\n", NULL);
|
||||
|
||||
String *director_sig = NewString("");
|
||||
|
||||
Printv(director_sig, "SwigDirector_", class_name, "::~SwigDirector_", class_name, "()", NULL);
|
||||
|
||||
if (throws) {
|
||||
Printv(director_sig, " ", throws, NULL);
|
||||
Delete(throws);
|
||||
}
|
||||
|
||||
Printv(director_sig, "\n", NULL);
|
||||
Printv(director_sig, "{\n", NULL);
|
||||
|
||||
makeDirectorDestructorWrapper(go_name, director_struct_name, director_sig);
|
||||
|
||||
Printv(f_c_directors, " delete swig_mem;\n", NULL);
|
||||
|
||||
Printv(f_c_directors, "}\n\n", NULL);
|
||||
|
||||
Delete(director_sig);
|
||||
String *throws = buildThrow(n);
|
||||
if (throws) {
|
||||
Printv(f_c_directors_h, " ", throws, NULL);
|
||||
}
|
||||
|
||||
Printv(f_c_directors_h, ";\n", NULL);
|
||||
|
||||
String *director_sig = NewString("");
|
||||
|
||||
Printv(director_sig, "SwigDirector_", class_name, "::~SwigDirector_", class_name, "()", NULL);
|
||||
|
||||
if (throws) {
|
||||
Printv(director_sig, " ", throws, NULL);
|
||||
Delete(throws);
|
||||
}
|
||||
|
||||
Printv(director_sig, "\n", NULL);
|
||||
Printv(director_sig, "{\n", NULL);
|
||||
|
||||
if (is_ignored) {
|
||||
Printv(f_c_directors, director_sig, NULL);
|
||||
} else {
|
||||
makeDirectorDestructorWrapper(go_name, director_struct_name, director_sig);
|
||||
}
|
||||
|
||||
Printv(f_c_directors, " delete swig_mem;\n", NULL);
|
||||
|
||||
Printv(f_c_directors, "}\n\n", NULL);
|
||||
|
||||
Delete(director_sig);
|
||||
Delete(go_name);
|
||||
Delete(cn);
|
||||
Delete(director_struct_name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue