Merge branch 'master' into doxygen
This commit is contained in:
commit
b7f78dd5a7
232 changed files with 5648 additions and 2419 deletions
|
|
@ -2660,8 +2660,6 @@ public:
|
|||
|
||||
Printf(imcall, ")");
|
||||
Printf(function_code, ")");
|
||||
if (is_interface)
|
||||
Printf(interface_class_code, ");\n");
|
||||
|
||||
// Transform return type used in JNI function (in intermediary class) to type used in Java wrapper function (in proxy class)
|
||||
if ((tm = Swig_typemap_lookup("javaout", n, "", 0))) {
|
||||
|
|
@ -2719,6 +2717,11 @@ public:
|
|||
Swig_warning(WARN_JAVA_TYPEMAP_JAVAOUT_UNDEF, input_file, line_number, "No javaout typemap defined for %s\n", SwigType_str(t, 0));
|
||||
}
|
||||
|
||||
if (is_interface) {
|
||||
Printf(interface_class_code, ")");
|
||||
generateThrowsClause(n, interface_class_code);
|
||||
Printf(interface_class_code, ";\n");
|
||||
}
|
||||
generateThrowsClause(n, function_code);
|
||||
Printf(function_code, " %s\n\n", tm ? tm : empty_string);
|
||||
Printv(proxy_class_code, function_code, NIL);
|
||||
|
|
@ -3895,15 +3898,16 @@ public:
|
|||
Printf(code_wrap->code, " %s *obj = *((%s **)&objarg);\n", smartptr, smartptr);
|
||||
Printf(code_wrap->code, " // Keep a local instance of the smart pointer around while we are using the raw pointer\n");
|
||||
Printf(code_wrap->code, " // Avoids using smart pointer specific API.\n");
|
||||
Printf(code_wrap->code, " %s *director = static_cast<%s *>(obj->operator->());\n", dirClassName, dirClassName);
|
||||
}
|
||||
else {
|
||||
Printf(code_wrap->code, " %s *director = dynamic_cast<%s *>(obj->operator->());\n", dirClassName, dirClassName);
|
||||
} else {
|
||||
Printf(code_wrap->code, " %s *obj = *((%s **)&objarg);\n", norm_name, norm_name);
|
||||
Printf(code_wrap->code, " %s *director = static_cast<%s *>(obj);\n", dirClassName, dirClassName);
|
||||
Printf(code_wrap->code, " %s *director = dynamic_cast<%s *>(obj);\n", dirClassName, dirClassName);
|
||||
}
|
||||
|
||||
Printf(code_wrap->code, " (void)jcls;\n");
|
||||
Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);\n");
|
||||
Printf(code_wrap->code, " if (director) {\n");
|
||||
Printf(code_wrap->code, " director->swig_java_change_ownership(jenv, jself, jtake_or_release ? true : false);\n");
|
||||
Printf(code_wrap->code, " }\n");
|
||||
Printf(code_wrap->code, "}\n");
|
||||
|
||||
Wrapper_print(code_wrap, f_wrappers);
|
||||
|
|
@ -4080,15 +4084,17 @@ public:
|
|||
/* If returning a reference, initialize the pointer to a sane
|
||||
default - if a Java exception occurs, then the pointer returns
|
||||
something other than a NULL-initialized reference. */
|
||||
String *non_ref_type = Copy(returntype);
|
||||
SwigType *noref_type = SwigType_del_reference(Copy(returntype));
|
||||
String *noref_ltype = SwigType_lstr(noref_type, 0);
|
||||
String *return_ltype = SwigType_lstr(returntype, 0);
|
||||
|
||||
/* Remove reference and const qualifiers */
|
||||
Replaceall(non_ref_type, "r.", "");
|
||||
Replaceall(non_ref_type, "q(const).", "");
|
||||
Wrapper_add_localv(w, "result_default", "static", SwigType_str(non_ref_type, "result_default"), "=", SwigType_str(non_ref_type, "()"), NIL);
|
||||
Wrapper_add_localv(w, "c_result", SwigType_lstr(returntype, "c_result"), "= &result_default", NIL);
|
||||
|
||||
Delete(non_ref_type);
|
||||
Wrapper_add_localv(w, "result_default", "static", noref_ltype, "result_default", NIL);
|
||||
Wrapper_add_localv(w, "c_result", return_ltype, "c_result", NIL);
|
||||
Printf(w->code, "result_default = SwigValueInit< %s >();\n", noref_ltype);
|
||||
Printf(w->code, "c_result = &result_default;\n");
|
||||
Delete(return_ltype);
|
||||
Delete(noref_ltype);
|
||||
Delete(noref_type);
|
||||
}
|
||||
|
||||
Delete(base_typename);
|
||||
|
|
@ -4179,7 +4185,7 @@ public:
|
|||
Swig_typemap_attach_parms("out", l, 0);
|
||||
Swig_typemap_attach_parms("jni", l, 0);
|
||||
Swig_typemap_attach_parms("jtype", l, 0);
|
||||
Swig_typemap_attach_parms("directorin", l, 0);
|
||||
Swig_typemap_attach_parms("directorin", l, w);
|
||||
Swig_typemap_attach_parms("javadirectorin", l, 0);
|
||||
Swig_typemap_attach_parms("directorargout", l, w);
|
||||
|
||||
|
|
@ -4378,11 +4384,11 @@ public:
|
|||
/* header declaration, start wrapper definition */
|
||||
String *target;
|
||||
SwigType *rtype = Getattr(n, "conversion_operator") ? 0 : Getattr(n, "classDirectorMethods:type");
|
||||
target = Swig_method_decl(rtype, decl, qualified_name, l, 0, 0);
|
||||
target = Swig_method_decl(rtype, decl, qualified_name, l, 0);
|
||||
Printf(w->def, "%s", target);
|
||||
Delete(qualified_name);
|
||||
Delete(target);
|
||||
target = Swig_method_decl(rtype, decl, name, l, 0, 1);
|
||||
target = Swig_method_decl(rtype, decl, name, l, 1);
|
||||
Printf(declaration, " virtual %s", target);
|
||||
Delete(target);
|
||||
|
||||
|
|
@ -4596,8 +4602,8 @@ public:
|
|||
if (!directorexcept) {
|
||||
directorexcept = NewString("");
|
||||
Printf(directorexcept, "jthrowable $error = jenv->ExceptionOccurred();\n");
|
||||
Printf(directorexcept, "if ($error) {\n");
|
||||
Printf(directorexcept, " jenv->ExceptionClear();$directorthrowshandlers\n");
|
||||
Printf(directorexcept, "if ($error) {");
|
||||
Printf(directorexcept, "$directorthrowshandlers\n");
|
||||
Printf(directorexcept, " Swig::DirectorException::raise(jenv, $error);\n");
|
||||
Printf(directorexcept, "}\n");
|
||||
} else {
|
||||
|
|
@ -4697,7 +4703,7 @@ public:
|
|||
/* constructor */
|
||||
{
|
||||
String *basetype = Getattr(parent, "classtype");
|
||||
String *target = Swig_method_decl(0, decl, dirclassname, parms, 0, 0);
|
||||
String *target = Swig_method_decl(0, decl, dirclassname, parms, 0);
|
||||
String *call = Swig_csuperclass_call(0, basetype, superparms);
|
||||
String *classtype = SwigType_namestr(Getattr(n, "name"));
|
||||
|
||||
|
|
@ -4711,7 +4717,7 @@ public:
|
|||
|
||||
/* constructor header */
|
||||
{
|
||||
String *target = Swig_method_decl(0, decl, dirclassname, parms, 0, 1);
|
||||
String *target = Swig_method_decl(0, decl, dirclassname, parms, 1);
|
||||
Printf(f_directors_h, " %s;\n", target);
|
||||
Delete(target);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue