director generated code formatting improvements to bring Java in line with the other languages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
06bc02c126
commit
b416ab7464
2 changed files with 13 additions and 28 deletions
|
|
@ -3460,8 +3460,6 @@ class JAVA : public Language {
|
||||||
* ------------------------------------------------------------ */
|
* ------------------------------------------------------------ */
|
||||||
|
|
||||||
int classDirectorInit(Node *n) {
|
int classDirectorInit(Node *n) {
|
||||||
/* String *director_classname = directorClassName(n);*/
|
|
||||||
|
|
||||||
Delete(none_comparison);
|
Delete(none_comparison);
|
||||||
none_comparison = NewString(""); // not used
|
none_comparison = NewString(""); // not used
|
||||||
|
|
||||||
|
|
@ -3472,21 +3470,8 @@ class JAVA : public Language {
|
||||||
|
|
||||||
Printf(f_directors_h, "%s {\n", Getattr(n, "director:decl"));
|
Printf(f_directors_h, "%s {\n", Getattr(n, "director:decl"));
|
||||||
Printf(f_directors_h, "\npublic:\n");
|
Printf(f_directors_h, "\npublic:\n");
|
||||||
/* Printf(f_directors_h, " virtual ~%s();\n", director_classname);*/
|
|
||||||
Printf(f_directors_h, " void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls);\n");
|
Printf(f_directors_h, " void swig_connect_director(JNIEnv *jenv, jobject jself, jclass jcls);\n");
|
||||||
|
|
||||||
/* Emit the destructor (this is basically a hack for G++ and shared libraries, at
|
|
||||||
least on the FreeBSD platform, if not for others. It also doesn't hurt to put
|
|
||||||
"default" destructors into the code, even if they don't appear to do anything.) */
|
|
||||||
|
|
||||||
/* This hack has been removed so that correct code is emitted for working compilers, see the director_exception.i testcase.
|
|
||||||
* Otherwise a search up all destructors is probably needed to understand exception specifications. Not easy with multiple inheritance. */
|
|
||||||
|
|
||||||
/*
|
|
||||||
Printf(f_directors, "%s::~%s() {\n", director_classname, director_classname);
|
|
||||||
Printf(f_directors, "}\n\n");
|
|
||||||
*/
|
|
||||||
|
|
||||||
/* Keep track of the director methods for this class */
|
/* Keep track of the director methods for this class */
|
||||||
first_class_dmethod = curr_class_dmethod = n_dmethods;
|
first_class_dmethod = curr_class_dmethod = n_dmethods;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1772,10 +1772,10 @@ int Language::classDirectorDestructor(Node *n) {
|
||||||
String *classname= Swig_class_name(getCurrentClass());
|
String *classname= Swig_class_name(getCurrentClass());
|
||||||
if (Getattr(n,"throw")) {
|
if (Getattr(n,"throw")) {
|
||||||
Printf(f_directors_h, " virtual ~SwigDirector_%s() throw ();\n", classname);
|
Printf(f_directors_h, " virtual ~SwigDirector_%s() throw ();\n", classname);
|
||||||
Printf(f_directors, "SwigDirector_%s::~SwigDirector_%s() throw () {}\n", classname, classname);
|
Printf(f_directors, "SwigDirector_%s::~SwigDirector_%s() throw () {\n}\n\n", classname, classname);
|
||||||
} else {
|
} else {
|
||||||
Printf(f_directors_h, " virtual ~SwigDirector_%s();\n", classname);
|
Printf(f_directors_h, " virtual ~SwigDirector_%s();\n", classname);
|
||||||
Printf(f_directors, "SwigDirector_%s::~SwigDirector_%s() {}\n", classname, classname);
|
Printf(f_directors, "SwigDirector_%s::~SwigDirector_%s() {\n}\n\n", classname, classname);
|
||||||
}
|
}
|
||||||
Delete(classname);
|
Delete(classname);
|
||||||
return SWIG_OK;
|
return SWIG_OK;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue