Director fix for #include "xxxx_wrap.h". Was incorrectly adding a directory in some situations. See #848335.
#849064 fixed. Any classes with a non public destructor now have a public delete() method which throw a runtime exception. The delete() method was previously protected. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5439 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
ed5a4bbb63
commit
a9c2e7aef3
1 changed files with 3 additions and 3 deletions
|
|
@ -361,7 +361,7 @@ class JAVA : public Language {
|
|||
Printf(f_directors, "/* ---------------------------------------------------\n");
|
||||
Printf(f_directors, " * C++ director class methods\n");
|
||||
Printf(f_directors, " * --------------------------------------------------- */\n\n");
|
||||
Printf(f_directors, "#include \"%s\"\n\n", outfile_h);
|
||||
Printf(f_directors, "#include \"%s\"\n\n", Swig_file_filename(outfile_h));
|
||||
}
|
||||
|
||||
String *wrapper_name = NewString("");
|
||||
|
|
@ -1356,9 +1356,9 @@ class JAVA : public Language {
|
|||
if (*Char(destructor_call))
|
||||
Replaceall(destruct, "$jnicall", destructor_call);
|
||||
else
|
||||
Replaceall(destruct, "$jnicall", "");
|
||||
Replaceall(destruct, "$jnicall", "throw new UnsupportedOperationException(\"C++ destructor does not have public access\")");
|
||||
if (*Char(destruct))
|
||||
Printv(proxy_class_def, "\n ", *Char(destructor_call) ? "public": "protected", " void ", destruct_methodname, "() ", destruct, "\n", NIL);
|
||||
Printv(proxy_class_def, "\n ", "public void ", destruct_methodname, "() ", destruct, "\n", NIL);
|
||||
}
|
||||
Delete(attributes);
|
||||
Delete(destruct);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue