@@ -1893,18 +1893,32 @@ class JAVA:public Language {
1893
1893
* ----------------------------------------------------------------------------- */
1894
1894
1895
1895
void upcastsCode (SwigType *smart, String *upcast_method_name, String *c_classname, String *c_baseclass) {
1896
+ Swig_warning (0 , NULL , NULL , " ******************************************\n " );
1897
+ Swig_warning (0 , NULL , NULL , " Smart: %s, Class name: '%s', baseclass: '%s' \n " , smart, c_classname, c_baseclass);
1896
1898
String *jniname = makeValidJniName (upcast_method_name);
1897
1899
String *wname = Swig_name_wrapper (jniname);
1898
1900
Printf (imclass_cppcasts_code, " public final static native long %s(long jarg1);\n " , upcast_method_name);
1899
1901
if (smart) {
1900
- SwigType *bsmart = Copy (smart);
1902
+ String *smartnamestr = SwigType_namestr (smart);
1903
+ String *bsmartnamestr = SwigType_namestr (smart);
1904
+
1901
1905
SwigType *rclassname = SwigType_typedef_resolve_all (c_classname);
1906
+ Swig_warning (0 , NULL , NULL , " SwigType_typedef_resolve_all - c_classname(%s): '%s'\n " , c_classname, rclassname);
1907
+
1902
1908
SwigType *rbaseclass = SwigType_typedef_resolve_all (c_baseclass);
1903
- Replaceall (bsmart, rclassname, rbaseclass);
1909
+ Swig_warning (0 , NULL , NULL , " SwigType_typedef_resolve_all - c_baseclass(%s): '%s'\n " , c_baseclass, rbaseclass);
1910
+
1911
+ Swig_warning (0 , NULL , NULL , " Replaceall - PRE(%s, %s, %s)\n " , bsmartnamestr, rclassname, rbaseclass);
1912
+ Replaceall (bsmartnamestr, rclassname, rbaseclass);
1913
+ Swig_warning (0 , NULL , NULL , " Replaceall - POST(%s, %s, %s)\n " , bsmartnamestr, rclassname, rbaseclass);
1914
+
1904
1915
Delete (rclassname);
1905
1916
Delete (rbaseclass);
1906
- String *smartnamestr = SwigType_namestr (smart);
1907
- String *bsmartnamestr = SwigType_namestr (bsmart);
1917
+ // String *smartnamestr = SwigType_namestr(smart);
1918
+ // String *bsmartnamestr = SwigType_namestr(bsmart);
1919
+ Swig_warning (0 , NULL , NULL , " bsmartnamestr: '%s', smartnamestr: '%s' \n " , bsmartnamestr, smartnamestr);
1920
+
1921
+
1908
1922
Printv (upcasts_code,
1909
1923
" SWIGEXPORT jlong JNICALL " , wname, " (JNIEnv *jenv, jclass jcls, jlong jarg1) {\n " ,
1910
1924
" jlong baseptr = 0;\n "
@@ -1917,7 +1931,6 @@ class JAVA:public Language {
1917
1931
" }\n " , " \n " , NIL);
1918
1932
Delete (bsmartnamestr);
1919
1933
Delete (smartnamestr);
1920
- Delete (bsmart);
1921
1934
} else {
1922
1935
Printv (upcasts_code,
1923
1936
" SWIGEXPORT jlong JNICALL " , wname, " (JNIEnv *jenv, jclass jcls, jlong jarg1) {\n " ,
@@ -1928,6 +1941,8 @@ class JAVA:public Language {
1928
1941
" return baseptr;\n "
1929
1942
" }\n " , " \n " , NIL);
1930
1943
}
1944
+ Swig_warning (0 , NULL , NULL , " ******************************************\n " );
1945
+
1931
1946
Delete (wname);
1932
1947
Delete (jniname);
1933
1948
}
0 commit comments