Merge latest master into doxygen branch.
This commit is contained in:
commit
9b857e6cf1
275 changed files with 6821 additions and 2094 deletions
|
|
@ -220,7 +220,7 @@ public:
|
|||
String *symname = Copy(Getattr(n, "sym:name"));
|
||||
if (symname && !GetFlag(n, "feature:flatnested")) {
|
||||
for (Node *outer_class = Getattr(n, "nested:outer"); outer_class; outer_class = Getattr(outer_class, "nested:outer")) {
|
||||
Push(symname, ".");
|
||||
Push(symname, jnidescriptor ? "$" : ".");
|
||||
Push(symname, Getattr(outer_class, "sym:name"));
|
||||
}
|
||||
}
|
||||
|
|
@ -877,7 +877,7 @@ public:
|
|||
bool is_destructor = (Cmp(Getattr(n, "nodeType"), "destructor") == 0);
|
||||
|
||||
if (!Getattr(n, "sym:overloaded")) {
|
||||
if (!addSymbol(Getattr(n, "sym:name"), n, imclass_name))
|
||||
if (!addSymbol(symname, n, imclass_name))
|
||||
return SWIG_ERROR;
|
||||
}
|
||||
|
||||
|
|
@ -1233,15 +1233,13 @@ public:
|
|||
return ret;
|
||||
}
|
||||
|
||||
String *getCurrentScopeName(String *nspace)
|
||||
{
|
||||
String *getCurrentScopeName(String *nspace) {
|
||||
String *scope = 0;
|
||||
if (nspace || getCurrentClass()) {
|
||||
scope = NewString("");
|
||||
if (nspace)
|
||||
Printf(scope, "%s", nspace);
|
||||
if (Node* cls = getCurrentClass())
|
||||
{
|
||||
if (Node* cls = getCurrentClass()) {
|
||||
if (Node *outer = Getattr(cls, "nested:outer")) {
|
||||
String *outerClassesPrefix = Copy(Getattr(outer, "sym:name"));
|
||||
for (outer = Getattr(outer, "nested:outer"); outer != 0; outer = Getattr(outer, "nested:outer")) {
|
||||
|
|
@ -1440,6 +1438,7 @@ public:
|
|||
int unnamedinstance = GetFlag(parent, "unnamedinstance");
|
||||
String *parent_name = Getattr(parent, "name");
|
||||
String *nspace = getNSpace();
|
||||
String *newsymname = 0;
|
||||
String *tmpValue;
|
||||
|
||||
// Strange hack from parent method
|
||||
|
|
@ -1464,14 +1463,20 @@ public:
|
|||
{
|
||||
EnumFeature enum_feature = decodeEnumFeature(parent);
|
||||
|
||||
if ((enum_feature == SimpleEnum) && GetFlag(parent, "scopedenum")) {
|
||||
newsymname = Swig_name_member(0, Getattr(parent, "sym:name"), symname);
|
||||
symname = newsymname;
|
||||
}
|
||||
|
||||
// Add to language symbol table
|
||||
String *scope = 0;
|
||||
if (unnamedinstance || !parent_name || enum_feature == SimpleEnum) {
|
||||
if (proxy_class_name) {
|
||||
String *enumClassPrefix = getEnumClassPrefix();
|
||||
if (enumClassPrefix) {
|
||||
scope = NewString("");
|
||||
if (nspace)
|
||||
Printf(scope, "%s.", nspace);
|
||||
Printf(scope, "%s", proxy_class_name);
|
||||
Printf(scope, "%s", enumClassPrefix);
|
||||
} else {
|
||||
scope = Copy(constants_interface_name);
|
||||
}
|
||||
|
|
@ -1482,7 +1487,7 @@ public:
|
|||
else
|
||||
Printf(scope, ".%s", Getattr(parent, "sym:name"));
|
||||
}
|
||||
if (!addSymbol(name, n, scope))
|
||||
if (!addSymbol(symname, n, scope))
|
||||
return SWIG_ERROR;
|
||||
|
||||
//translate and write javadoc comment if flagged
|
||||
|
|
@ -1545,6 +1550,7 @@ public:
|
|||
Delete(scope);
|
||||
}
|
||||
|
||||
Delete(newsymname);
|
||||
Delete(tmpValue);
|
||||
Swig_restore(n);
|
||||
return SWIG_OK;
|
||||
|
|
@ -2391,7 +2397,7 @@ public:
|
|||
Printf(imcall, "swigCPtr");
|
||||
|
||||
String *this_type = Copy(getClassType());
|
||||
String *name = NewString("self");
|
||||
String *name = NewString("jself");
|
||||
String *qualifier = Getattr(n, "qualifier");
|
||||
if (qualifier)
|
||||
SwigType_push(this_type, qualifier);
|
||||
|
|
@ -3100,6 +3106,16 @@ public:
|
|||
// Use the C syntax to make a true Java constant and hope that it compiles as Java code
|
||||
value = Getattr(n, "enumvalue") ? Copy(Getattr(n, "enumvalue")) : Copy(Getattr(n, "enumvalueex"));
|
||||
} else {
|
||||
String *newsymname = 0;
|
||||
if (!getCurrentClass() || !proxy_flag) {
|
||||
String *enumClassPrefix = getEnumClassPrefix();
|
||||
if (enumClassPrefix) {
|
||||
// A global scoped enum
|
||||
newsymname = Swig_name_member(0, enumClassPrefix, symname);
|
||||
symname = newsymname;
|
||||
}
|
||||
}
|
||||
|
||||
// Get the enumvalue from a JNI call
|
||||
if (!getCurrentClass() || !cparse_cplusplus || !proxy_flag) {
|
||||
// Strange hack to change the name
|
||||
|
|
@ -3108,8 +3124,9 @@ public:
|
|||
value = NewStringf("%s.%s()", full_imclass_name ? full_imclass_name : imclass_name, Swig_name_get(getNSpace(), symname));
|
||||
} else {
|
||||
memberconstantHandler(n);
|
||||
value = NewStringf("%s.%s()", full_imclass_name ? full_imclass_name : imclass_name, Swig_name_get(getNSpace(), Swig_name_member(0, proxy_class_name, symname)));
|
||||
value = NewStringf("%s.%s()", full_imclass_name ? full_imclass_name : imclass_name, Swig_name_get(getNSpace(), Swig_name_member(0, getEnumClassPrefix(), symname)));
|
||||
}
|
||||
Delete(newsymname);
|
||||
}
|
||||
}
|
||||
return value;
|
||||
|
|
@ -3774,7 +3791,6 @@ public:
|
|||
* --------------------------------------------------------------- */
|
||||
|
||||
int classDirectorMethod(Node *n, Node *parent, String *super) {
|
||||
String *classname = Getattr(parent, "sym:name");
|
||||
String *c_classname = Getattr(parent, "name");
|
||||
String *name = Getattr(n, "name");
|
||||
String *symname = Getattr(n, "sym:name");
|
||||
|
|
@ -3808,14 +3824,7 @@ public:
|
|||
String *imcall_args = NewString("");
|
||||
int classmeth_off = curr_class_dmethod - first_class_dmethod;
|
||||
bool ignored_method = GetFlag(n, "feature:ignore") ? true : false;
|
||||
String *qualified_classname = Copy(classname);
|
||||
String *nspace = getNSpace();
|
||||
|
||||
if (nspace && package)
|
||||
Insert(qualified_classname, 0, NewStringf("%s.%s.", package, nspace));
|
||||
else if(nspace)
|
||||
Insert(qualified_classname, 0, NewStringf("%s.", nspace));
|
||||
|
||||
String *qualified_classname = getProxyName(getClassName());
|
||||
|
||||
// Kludge Alert: functionWrapper sets sym:overload properly, but it
|
||||
// isn't at this point, so we have to manufacture it ourselves. At least
|
||||
|
|
@ -3876,7 +3885,7 @@ public:
|
|||
/* Create the intermediate class wrapper */
|
||||
tm = Swig_typemap_lookup("jtype", n, "", 0);
|
||||
if (tm) {
|
||||
Printf(callback_def, " public static %s %s(%s self", tm, imclass_dmethod, qualified_classname);
|
||||
Printf(callback_def, " public static %s %s(%s jself", tm, imclass_dmethod, qualified_classname);
|
||||
} else {
|
||||
Swig_warning(WARN_JAVA_TYPEMAP_JTYPE_UNDEF, input_file, line_number, "No jtype typemap defined for %s\n", SwigType_str(returntype, 0));
|
||||
}
|
||||
|
|
@ -3938,7 +3947,6 @@ public:
|
|||
}
|
||||
|
||||
Delete(adjustedreturntypeparm);
|
||||
Delete(qualified_classname);
|
||||
|
||||
Swig_director_parms_fixup(l);
|
||||
|
||||
|
|
@ -3993,7 +4001,7 @@ public:
|
|||
Printf(w->code, "if (swigjobj && jenv->IsSameObject(swigjobj, NULL) == JNI_FALSE) {\n");
|
||||
}
|
||||
|
||||
/* Start the Java field descriptor for the intermediate class's upcall (insert self object) */
|
||||
/* Start the Java field descriptor for the intermediate class's upcall (insert jself object) */
|
||||
Parm *tp = NewParmNode(c_classname, n);
|
||||
String *jdesc;
|
||||
|
||||
|
|
@ -4204,7 +4212,7 @@ public:
|
|||
|
||||
/* Emit the intermediate class's upcall to the actual class */
|
||||
|
||||
String *upcall = NewStringf("self.%s(%s)", symname, imcall_args);
|
||||
String *upcall = NewStringf("jself.%s(%s)", symname, imcall_args);
|
||||
|
||||
// Handle exception classes specified in the "except" feature's "throws" attribute
|
||||
addThrows(n, "feature:except", n);
|
||||
|
|
@ -4579,18 +4587,15 @@ public:
|
|||
* ------------------------------------------------------------ */
|
||||
|
||||
int classDirectorEnd(Node *n) {
|
||||
String *classname = Getattr(n, "sym:name");
|
||||
String *full_classname = Getattr(n, "name");
|
||||
String *classname = getProxyName(full_classname, true);
|
||||
String *director_classname = directorClassName(n);
|
||||
String *internal_classname;
|
||||
|
||||
Wrapper *w = NewWrapper();
|
||||
|
||||
if (Len(package_path) > 0 && Len(getNSpace()) > 0)
|
||||
internal_classname = NewStringf("%s/%s/%s", package_path, getNSpace(), classname);
|
||||
else if (Len(package_path) > 0)
|
||||
if (Len(package_path) > 0)
|
||||
internal_classname = NewStringf("%s/%s", package_path, classname);
|
||||
else if (Len(getNSpace()) > 0)
|
||||
internal_classname = NewStringf("%s/%s", getNSpace(), classname);
|
||||
else
|
||||
internal_classname = NewStringf("%s", classname);
|
||||
|
||||
|
|
@ -4702,6 +4707,7 @@ public:
|
|||
/*----------------------------------------------------------------------
|
||||
* extraDirectorProtectedCPPMethodsRequired()
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
bool extraDirectorProtectedCPPMethodsRequired() const {
|
||||
return false;
|
||||
}
|
||||
|
|
@ -4727,6 +4733,10 @@ public:
|
|||
Setattr(n, "director:ctor", class_ctor);
|
||||
}
|
||||
|
||||
/*----------------------------------------------------------------------
|
||||
* nestedClassesSupport()
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
NestedClassSupport nestedClassesSupport() const {
|
||||
return NCS_Full;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue