JNI descriptor attribute in directorin typemap called descriptor instead of parse now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5277 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
d725be7f9e
commit
05d2ab63eb
5 changed files with 83 additions and 98 deletions
|
|
@ -225,7 +225,7 @@ JAVA_ARRAYS_IMPL(double, jdouble, Double, Double) /* double[] */
|
|||
if (!SWIG_JavaArrayIn##JFUNCNAME(jenv, &jarr, &$1, $input)) return $null; %}
|
||||
%typemap(argout) CTYPE[ANY]
|
||||
%{ SWIG_JavaArrayArgout##JFUNCNAME(jenv, jarr$argnum, $1, $input); %}
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE[ANY]
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE[ANY]
|
||||
%{$input = SWIG_JavaArrayOut##JFUNCNAME(jenv, $1, $1_dim0); %}
|
||||
%typemap(out) CTYPE[ANY]
|
||||
%{$result = SWIG_JavaArrayOut##JFUNCNAME(jenv, $1, $1_dim0); %}
|
||||
|
|
|
|||
|
|
@ -179,20 +179,20 @@
|
|||
enum SWIGTYPE
|
||||
%{ $1 = ($1_ltype)$input; %}
|
||||
|
||||
%typemap(directorin, parse="Z") bool "$input = (jboolean) $1;"
|
||||
%typemap(directorin, parse="C") char "$input = (jint) $1;"
|
||||
%typemap(directorin, parse="B") signed char "$input = (jbyte) $1;"
|
||||
%typemap(directorin, parse="S") unsigned char "$input = (jshort) $1;"
|
||||
%typemap(directorin, parse="S") short "$input = (jshort) $1;"
|
||||
%typemap(directorin, parse="I") unsigned short "$input = (jint) $1;"
|
||||
%typemap(directorin, parse="I") int "$input = (jint) $1;"
|
||||
%typemap(directorin, parse="J") unsigned int "$input = (jlong) $1;"
|
||||
%typemap(directorin, parse="I") long "$input = (jint) $1;"
|
||||
%typemap(directorin, parse="J") unsigned long "$input = (jlong) $1;"
|
||||
%typemap(directorin, parse="J") long long "$input = (jlong) $1;"
|
||||
%typemap(directorin, parse="F") float "$input = (jfloat) $1;"
|
||||
%typemap(directorin, parse="D") double "$input = (jdouble) $1;"
|
||||
%typemap(directorin, parse="I") enum SWIGTYPE "$input = (jint) $1;"
|
||||
%typemap(directorin, descriptor="Z") bool "$input = (jboolean) $1;"
|
||||
%typemap(directorin, descriptor="C") char "$input = (jint) $1;"
|
||||
%typemap(directorin, descriptor="B") signed char "$input = (jbyte) $1;"
|
||||
%typemap(directorin, descriptor="S") unsigned char "$input = (jshort) $1;"
|
||||
%typemap(directorin, descriptor="S") short "$input = (jshort) $1;"
|
||||
%typemap(directorin, descriptor="I") unsigned short "$input = (jint) $1;"
|
||||
%typemap(directorin, descriptor="I") int "$input = (jint) $1;"
|
||||
%typemap(directorin, descriptor="J") unsigned int "$input = (jlong) $1;"
|
||||
%typemap(directorin, descriptor="I") long "$input = (jint) $1;"
|
||||
%typemap(directorin, descriptor="J") unsigned long "$input = (jlong) $1;"
|
||||
%typemap(directorin, descriptor="J") long long "$input = (jlong) $1;"
|
||||
%typemap(directorin, descriptor="F") float "$input = (jfloat) $1;"
|
||||
%typemap(directorin, descriptor="D") double "$input = (jdouble) $1;"
|
||||
%typemap(directorin, descriptor="I") enum SWIGTYPE "$input = (jint) $1;"
|
||||
|
||||
%typemap(javadirectorin) char,
|
||||
signed char,
|
||||
|
|
@ -292,7 +292,7 @@
|
|||
}
|
||||
|
||||
/* Convert to BigInteger (see out typemap) */
|
||||
%typemap(directorin, parse="Ljava/math/Biginteger;") unsigned long long, const unsigned long long & {
|
||||
%typemap(directorin, descriptor="Ljava/math/Biginteger;") unsigned long long, const unsigned long long & {
|
||||
jbyteArray ba = JCALL1(NewByteArray, jenv, 9);
|
||||
jbyte* bae = JCALL2(GetByteArrayElements, jenv, ba, 0);
|
||||
jclass clazz = JCALL1(FindClass, jenv, "java/math/BigInteger");
|
||||
|
|
@ -322,7 +322,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(directorin, parse="Ljava/lang/String;") char * {
|
||||
%typemap(directorin, descriptor="Ljava/lang/String;") char * {
|
||||
$input = 0;
|
||||
if ($1) {
|
||||
$input = JCALL1(NewStringUTF, jenv, $1);
|
||||
|
|
@ -337,7 +337,7 @@
|
|||
%typemap(out) void ""
|
||||
%typemap(javadirectorin) void "$jniinput"
|
||||
%typemap(javadirectorout) void "$javacall"
|
||||
%typemap(directorin, parse="V") void ""
|
||||
%typemap(directorin, descriptor="V") void ""
|
||||
|
||||
/* primitive types by reference */
|
||||
%typemap(in) const bool & (bool temp)
|
||||
|
|
@ -362,19 +362,19 @@
|
|||
%{ temp = ($*1_ltype)$input;
|
||||
$1 = &temp; %}
|
||||
|
||||
%typemap(directorin, parse="Z") const bool & "$input = (jboolean)$1_name;"
|
||||
%typemap(directorin, parse="C") const char & "$input = (jchar)$1_name;"
|
||||
%typemap(directorin, parse="B") const signed char & "$input = (jbyte)$1_name;"
|
||||
%typemap(directorin, parse="S") const unsigned char & "$input = (jshort)$1_name;"
|
||||
%typemap(directorin, parse="S") const short & "$input = (jshort)$1_name;"
|
||||
%typemap(directorin, parse="I") const unsigned short & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, parse="I") const int & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, parse="J") const unsigned int & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, parse="I") const long & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, parse="J") const unsigned long & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, parse="J") const long long & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, parse="F") const float & "$input = (jfloat)$1_name;"
|
||||
%typemap(directorin, parse="D") const double & "$input = (jdouble)$1_name;"
|
||||
%typemap(directorin, descriptor="Z") const bool & "$input = (jboolean)$1_name;"
|
||||
%typemap(directorin, descriptor="C") const char & "$input = (jchar)$1_name;"
|
||||
%typemap(directorin, descriptor="B") const signed char & "$input = (jbyte)$1_name;"
|
||||
%typemap(directorin, descriptor="S") const unsigned char & "$input = (jshort)$1_name;"
|
||||
%typemap(directorin, descriptor="S") const short & "$input = (jshort)$1_name;"
|
||||
%typemap(directorin, descriptor="I") const unsigned short & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, descriptor="I") const int & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, descriptor="J") const unsigned int & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, descriptor="I") const long & "$input = (jint)$1_name;"
|
||||
%typemap(directorin, descriptor="J") const unsigned long & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, descriptor="J") const long long & "$input = (jlong)$1_name;"
|
||||
%typemap(directorin, descriptor="F") const float & "$input = (jfloat)$1_name;"
|
||||
%typemap(directorin, descriptor="D") const double & "$input = (jdouble)$1_name;"
|
||||
|
||||
%typemap(javadirectorin) const char & (char temp),
|
||||
const signed char & (signed char temp),
|
||||
|
|
@ -494,7 +494,7 @@
|
|||
}
|
||||
#endif
|
||||
|
||||
%typemap(directorin,parse="L$packagepath/$javaclassname;") SWIGTYPE "*(($&1_type)&$input) = &$1;"
|
||||
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE "*(($&1_type)&$input) = &$1;"
|
||||
%typemap(javadirectorin) SWIGTYPE "new $javaclassname($jniinput, false)"
|
||||
%typemap(javadirectorout) SWIGTYPE "$javaclassname.getCPtr($javacall)"
|
||||
|
||||
|
|
@ -510,10 +510,10 @@
|
|||
%typemap(out) SWIGTYPE &
|
||||
%{ *($&1_ltype)&$result = $1; %}
|
||||
|
||||
%typemap(directorin,parse="L$packagepath/$javaclassname;") SWIGTYPE *, SWIGTYPE (CLASS::*)
|
||||
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE *, SWIGTYPE (CLASS::*)
|
||||
%{ *(($&1_ltype)&$input) = ($1_ltype) $1; %}
|
||||
|
||||
%typemap(directorin,parse="L$packagepath/$javaclassname;") SWIGTYPE &
|
||||
%typemap(directorin,descriptor="L$packagepath/$javaclassname;") SWIGTYPE &
|
||||
%{ *($&1_ltype)&$input = ($1_ltype) &$1; %}
|
||||
|
||||
%typemap(javadirectorin) SWIGTYPE *, SWIGTYPE (CLASS::*), SWIGTYPE &, const SWIGTYPE & "new $javaclassname($jniinput, false)"
|
||||
|
|
@ -532,7 +532,7 @@
|
|||
}
|
||||
}
|
||||
|
||||
%typemap(directorin,parse="Ljava/lang/String;") char[ANY] "$input = JCALL1(NewStringUTF, jenv, $1_name);"
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") char[ANY] "$input = JCALL1(NewStringUTF, jenv, $1_name);"
|
||||
|
||||
%typemap(argout) char[ANY] ""
|
||||
%typemap(freearg) char[ANY] { if ($1) JCALL2(ReleaseStringUTFChars, jenv, $input, $1); }
|
||||
|
|
@ -583,25 +583,25 @@
|
|||
jobjectArray
|
||||
%{ $result = $1; %}
|
||||
|
||||
%typemap(directorin,parse="Z") jboolean "$input = $1;"
|
||||
%typemap(directorin,parse="C") jchar "$input = $1;"
|
||||
%typemap(directorin,parse="B") jbyte "$input = $1;"
|
||||
%typemap(directorin,parse="S") jshort "$input = $1;"
|
||||
%typemap(directorin,parse="I") jint "$input = $1;"
|
||||
%typemap(directorin,parse="J") jlong "$input = $1;"
|
||||
%typemap(directorin,parse="F") jfloat "$input = $1;"
|
||||
%typemap(directorin,parse="D") jdouble "$input = $1;"
|
||||
%typemap(directorin,parse="Ljava/lang/String;") jstring "$input = $1;"
|
||||
%typemap(directorin,parse="Ljava/lang/Object;") jobject "$input = $1;"
|
||||
%typemap(directorin,parse="[Z") jbooleanArray "$input = $1;"
|
||||
%typemap(directorin,parse="[C") jcharArray "$input = $1;"
|
||||
%typemap(directorin,parse="[B") jbyteArray "$input = $1;"
|
||||
%typemap(directorin,parse="[S") jshortArray "$input = $1;"
|
||||
%typemap(directorin,parse="[I") jintArray "$input = $1;"
|
||||
%typemap(directorin,parse="[J") jlongArray "$input = $1;"
|
||||
%typemap(directorin,parse="[F") jfloatArray "$input = $1;"
|
||||
%typemap(directorin,parse="[D") jdoubleArray "$input = $1;"
|
||||
%typemap(directorin,parse="[Ljava/lang/Object;") jobjectArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="Z") jboolean "$input = $1;"
|
||||
%typemap(directorin,descriptor="C") jchar "$input = $1;"
|
||||
%typemap(directorin,descriptor="B") jbyte "$input = $1;"
|
||||
%typemap(directorin,descriptor="S") jshort "$input = $1;"
|
||||
%typemap(directorin,descriptor="I") jint "$input = $1;"
|
||||
%typemap(directorin,descriptor="J") jlong "$input = $1;"
|
||||
%typemap(directorin,descriptor="F") jfloat "$input = $1;"
|
||||
%typemap(directorin,descriptor="D") jdouble "$input = $1;"
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") jstring "$input = $1;"
|
||||
%typemap(directorin,descriptor="Ljava/lang/Object;") jobject "$input = $1;"
|
||||
%typemap(directorin,descriptor="[Z") jbooleanArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[C") jcharArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[B") jbyteArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[S") jshortArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[I") jintArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[J") jlongArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[F") jfloatArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[D") jdoubleArray "$input = $1;"
|
||||
%typemap(directorin,descriptor="[Ljava/lang/Object;") jobjectArray "$input = $1;"
|
||||
|
||||
%typemap(javadirectorin) jboolean,
|
||||
jchar,
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@ class string;
|
|||
return $null;
|
||||
} %}
|
||||
|
||||
%typemap(directorin,parse="Ljava/lang/String;") string
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") string
|
||||
%{ $input = jenv->NewStringUTF($1.c_str()); %}
|
||||
|
||||
%typemap(out) string
|
||||
|
|
@ -80,7 +80,7 @@ class string;
|
|||
%typemap(freearg) const string &
|
||||
%{ delete $1; %}
|
||||
|
||||
%typemap(directorin,parse="Ljava/lang/String;") const string &
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") const string &
|
||||
%{ $input = jenv->NewStringUTF($1.c_str()); %}
|
||||
|
||||
%typemap(out) const string &
|
||||
|
|
@ -142,7 +142,7 @@ class wstring;
|
|||
return $null;
|
||||
} %}
|
||||
|
||||
%typemap(directorin,parse="Ljava/lang/String;") wstring
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") wstring
|
||||
%{jsize len = $1.length();
|
||||
jchar *conv_buf = new jchar[len];
|
||||
for (jsize i = 0; i < len; ++i) {
|
||||
|
|
@ -194,7 +194,7 @@ class wstring;
|
|||
return $null;
|
||||
} %}
|
||||
|
||||
%typemap(directorin,parse="Ljava/lang/String;") const wstring &
|
||||
%typemap(directorin,descriptor="Ljava/lang/String;") const wstring &
|
||||
%{jsize len = $1->length();
|
||||
jchar *conv_buf = new jchar[len];
|
||||
for (jsize i = 0; i < len; ++i) {
|
||||
|
|
|
|||
|
|
@ -76,10 +76,10 @@ In Java you could then use it like this:
|
|||
%typemap(in) CTYPE *INPUT, CTYPE &INPUT
|
||||
%{ $1 = ($1_ltype)&$input; %}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CYTPE &INPUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CYTPE &INPUT
|
||||
%{ *(($&1_ltype) $input) = (JNITYPE *) &$1; %}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE *INPUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE *INPUT
|
||||
%{ *(($&1_ltype) $input) = (JNITYPE *) $1; %}
|
||||
|
||||
%typemap(typecheck) CTYPE *INPUT = CTYPE;
|
||||
|
|
@ -220,10 +220,10 @@ value in the single element array. In Java you would use it like this:
|
|||
$1 = &temp;
|
||||
}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE &OUTPUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE &OUTPUT
|
||||
%{ *(($&1_ltype) $input = &$1; %}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE *OUTPUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE *OUTPUT
|
||||
%{
|
||||
#error "Need to provide OUT directorin typemap, CTYPE array length is unknown"
|
||||
%}
|
||||
|
|
@ -354,10 +354,10 @@ of the function return value. This difference is due to Java being a typed langu
|
|||
$1 = ($1_ltype) JCALL2(Get##JAVATYPE##ArrayElements, jenv, $input, 0);
|
||||
}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE &INOUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE &INOUT
|
||||
%{ *(($&1_ltype)&$input) = &$1; %}
|
||||
|
||||
%typemap(directorin,parse=JNIDESC) CTYPE *INOUT, CTYPE &INOUT
|
||||
%typemap(directorin,descriptor=JNIDESC) CTYPE *INOUT, CTYPE &INOUT
|
||||
{
|
||||
#error "Need to provide INOUT directorin typemap, CTYPE array length is unknown"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,9 +40,7 @@ extern String *method_decl(SwigType *s, const String_or_char *id, List *args, in
|
|||
* class names.
|
||||
* ----------------------------------------------------------------------------- */
|
||||
|
||||
String *
|
||||
SwigType_director_type(String *intype, String *classname, String *director_classname)
|
||||
{
|
||||
String * SwigType_director_type(String *intype, String *classname, String *director_classname) {
|
||||
String *base_type = SwigType_base(intype);
|
||||
String *director_type = SwigType_typedef_resolve(base_type);
|
||||
int is_pointer = SwigType_ispointer(intype);
|
||||
|
|
@ -653,10 +651,7 @@ class JAVA : public Language {
|
|||
* Add new director upcall signature
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
UpcallData *
|
||||
addUpcallMethod(String *imclass_method, String *class_method, String *imclass_desc, String *class_desc,
|
||||
String *decl)
|
||||
{
|
||||
UpcallData * addUpcallMethod(String *imclass_method, String *class_method, String *imclass_desc, String *class_desc, String *decl) {
|
||||
UpcallData *udata;
|
||||
String *imclass_methodidx;
|
||||
String *class_methodidx;
|
||||
|
|
@ -693,9 +688,7 @@ class JAVA : public Language {
|
|||
* Get director upcall signature
|
||||
*----------------------------------------------------------------------*/
|
||||
|
||||
UpcallData *
|
||||
getUpcallMethodData(String *director_class, String *decl)
|
||||
{
|
||||
UpcallData * getUpcallMethodData(String *director_class, String *decl) {
|
||||
String *key = NewStringf("%s|%s", director_class, decl);
|
||||
UpcallData *udata = Getattr(dmethods_table, key);
|
||||
|
||||
|
|
@ -832,14 +825,14 @@ class JAVA : public Language {
|
|||
Swig_typemap_attach_parms("jni", l, f);
|
||||
Swig_typemap_attach_parms("jtype", l, f);
|
||||
if (director_method) {
|
||||
if (Getattr(n, "tmap:directorin") == NULL || Getattr(n, "tmap:directorin:parse") == NULL) {
|
||||
if (Getattr(n, "tmap:directorin") == NULL || Getattr(n, "tmap:directorin:descriptor") == NULL) {
|
||||
Parm *jni_pm = NewParm(t, (String*) empty_string);
|
||||
String *jni_tm = Swig_typemap_lookup_new("jni", jni_pm, "", 0);
|
||||
Parm *din_pm = NewParm(jni_tm, (String*) empty_string);
|
||||
String *din_tm = Swig_typemap_lookup_new("directorin", din_pm, "", 0);
|
||||
|
||||
Setattr(n, "tmap:directorin", din_tm);
|
||||
Setattr(n, "tmap:directorin:parse", Getattr(din_pm, "tmap:directorin:parse"));
|
||||
Setattr(n, "tmap:directorin:descriptor", Getattr(din_pm, "tmap:directorin:descriptor"));
|
||||
|
||||
Delete(jni_pm);
|
||||
Delete(jni_tm);
|
||||
|
|
@ -1091,7 +1084,7 @@ class JAVA : public Language {
|
|||
Printf(f->code, "} else {\n");
|
||||
Printv(f->code, director_jargs, NIL);
|
||||
|
||||
if ((tm= Getattr(n, "tmap:directorin")) != NULL && (jdescrip = Getattr(n, "tmap:directorin:parse")) != NULL) {
|
||||
if ((tm= Getattr(n, "tmap:directorin")) != NULL && (jdescrip = Getattr(n, "tmap:directorin:descriptor")) != NULL) {
|
||||
String *jni_canon = canonicalJNIFDesc(jdescrip, n, proxy_class_name);
|
||||
|
||||
Delete(jdescrip);
|
||||
|
|
@ -2474,8 +2467,7 @@ class JAVA : public Language {
|
|||
* getUpcallJNIMethod()
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
String * getUpcallJNIMethod(String *descrip)
|
||||
{
|
||||
String * getUpcallJNIMethod(String *descrip) {
|
||||
static struct {
|
||||
char code;
|
||||
const char *method;
|
||||
|
|
@ -2507,8 +2499,7 @@ class JAVA : public Language {
|
|||
* emitDirectorUpcalls()
|
||||
*--------------------------------------------------------------------*/
|
||||
|
||||
void emitDirectorUpcalls()
|
||||
{
|
||||
void emitDirectorUpcalls() {
|
||||
if (n_dmethods) {
|
||||
Wrapper *w = NewWrapper();
|
||||
String *jni_imclass_name = makeValidJniName(imclass_name);
|
||||
|
|
@ -2572,8 +2563,7 @@ class JAVA : public Language {
|
|||
* haven't found it yet.
|
||||
* --------------------------------------------------------------- */
|
||||
|
||||
Node *canonicalizeType(Node *n, String *classtype)
|
||||
{
|
||||
Node *canonicalizeType(Node *n, String *classtype) {
|
||||
String *reduced_type = SwigType_typedef_resolve_all(classtype);
|
||||
String *base_type = SwigType_base(reduced_type);
|
||||
Node *classnode = Swig_symbol_clookup(base_type, Getattr(n, "sym:symtab"));
|
||||
|
|
@ -2623,8 +2613,7 @@ class JAVA : public Language {
|
|||
*
|
||||
* --------------------------------------------------------------- */
|
||||
|
||||
String *canonicalJNIFDesc(String *in_desc, Node *n, String *classtype)
|
||||
{
|
||||
String *canonicalJNIFDesc(String *in_desc, Node *n, String *classtype) {
|
||||
Node *classnode = canonicalizeType(n, classtype);
|
||||
String *name = (classnode ? Getattr(classnode, "name") : classtype);
|
||||
String *symname = (classnode ? Getattr(classnode, "sym:name") : classtype);
|
||||
|
|
@ -2668,8 +2657,7 @@ class JAVA : public Language {
|
|||
*
|
||||
* --------------------------------------------------------------- */
|
||||
|
||||
int classDirectorMethod(Node *n, Node *parent, String *super)
|
||||
{
|
||||
int classDirectorMethod(Node *n, Node *parent, String *super) {
|
||||
String *empty_str = NewString("");
|
||||
String *classname = Getattr(parent, "sym:name");
|
||||
String *name = Getattr(n, "name");
|
||||
|
|
@ -2689,7 +2677,7 @@ class JAVA : public Language {
|
|||
ParmList *l = Getattr(n, "parms");
|
||||
bool is_void = !(Cmp(type, "void"));
|
||||
bool pure_virtual = (!(Cmp(storage, "virtual")) && !(Cmp(value, "0")));
|
||||
bool is_const = SwigType_isconst(decl);
|
||||
bool is_const = SwigType_isconst(decl) ? true : false;
|
||||
int status = SWIG_OK;
|
||||
|
||||
bool output_director = true;
|
||||
|
|
@ -2791,7 +2779,7 @@ class JAVA : public Language {
|
|||
}
|
||||
|
||||
if ((tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:descriptor")) != NULL) {
|
||||
String *jnidesc_canon;
|
||||
|
||||
jnidesc_canon = canonicalJNIFDesc(jdesc, n, jniret_type);
|
||||
|
|
@ -2813,7 +2801,7 @@ class JAVA : public Language {
|
|||
String *jdesc;
|
||||
|
||||
if ((tm = Swig_typemap_lookup_new("directorin", retpm, "", 0)) != NULL
|
||||
&& (jdesc = Getattr(retpm, "tmap:directorin:parse")) != NULL) {
|
||||
&& (jdesc = Getattr(retpm, "tmap:directorin:descriptor")) != NULL) {
|
||||
String *jnidesc_canon;
|
||||
|
||||
jnidesc_canon = canonicalJNIFDesc(jdesc, n, return_type);
|
||||
|
|
@ -2894,7 +2882,7 @@ class JAVA : public Language {
|
|||
String *jdesc;
|
||||
|
||||
if ((tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:descriptor")) != NULL) {
|
||||
String *jni_canon;
|
||||
|
||||
jni_canon = canonicalJNIFDesc(jdesc, n, classname);
|
||||
|
|
@ -2954,9 +2942,9 @@ class JAVA : public Language {
|
|||
|
||||
/* Add input marshalling code and update JNI field descriptor */
|
||||
if ((desc_tm = Swig_typemap_lookup_new("directorin", tp, "", 0)) != NULL
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:parse")) != NULL) {
|
||||
&& (jdesc = Getattr(tp, "tmap:directorin:descriptor")) != NULL) {
|
||||
if ((tm = Getattr(p, "tmap:directorin")) != NULL
|
||||
&& (cdesc = Getattr(p, "tmap:directorin:parse")) != NULL) {
|
||||
&& (cdesc = Getattr(p, "tmap:directorin:descriptor")) != NULL) {
|
||||
String *jni_canon;
|
||||
|
||||
jni_canon = canonicalJNIFDesc(jdesc, n, c_param_type);
|
||||
|
|
@ -3217,8 +3205,7 @@ class JAVA : public Language {
|
|||
* directorPrefixArgs()
|
||||
* ------------------------------------------------------------ */
|
||||
|
||||
void directorPrefixArgs(Node *n)
|
||||
{
|
||||
void directorPrefixArgs(Node *n) {
|
||||
Parm *p;
|
||||
|
||||
/* Need to prepend 'jenv' to the director constructor's argument list */
|
||||
|
|
@ -3461,7 +3448,6 @@ class JAVA : public Language {
|
|||
* classDirectorDisown()
|
||||
* ------------------------------------------------------------------*/
|
||||
virtual int classDirectorDisown(Node *n) {
|
||||
/* NOP */
|
||||
return SWIG_OK;
|
||||
}
|
||||
|
||||
|
|
@ -3472,8 +3458,7 @@ class JAVA : public Language {
|
|||
* e.g. "class SwigDirector_myclass : public myclass, public Swig::Director {"
|
||||
* ------------------------------------------------------------------*/
|
||||
|
||||
void
|
||||
Java_director_declaration(Node *n) {
|
||||
void Java_director_declaration(Node *n) {
|
||||
String *base = Getattr(n, "classtype");
|
||||
String *class_ctor = NewString("Swig::Director(jenv)");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue