diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-09 00:25:26 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2015-10-09 00:27:27 +0300 |
commit | 02041bf2e0f541f67a76ce6e77aad92b896cc18a (patch) | |
tree | 1519b0e84102bbcd7a6454e38ce1654781d370da | |
parent | 216b6a494eaafa95482d611ef2c24bba5c5428a9 (diff) | |
download | micropython-02041bf2e0f541f67a76ce6e77aad92b896cc18a.tar.gz micropython-02041bf2e0f541f67a76ce6e77aad92b896cc18a.zip |
unix/modjni: jvalue2py() is currently not used.
Not remove so far, may be needed later.
-rw-r--r-- | unix/modjni.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unix/modjni.c b/unix/modjni.c index 71c525b00f..7588f46cac 100644 --- a/unix/modjni.c +++ b/unix/modjni.c @@ -39,6 +39,7 @@ #define JJ(call, ...) (*env)->call(env, __VA_ARGS__) #define JJ1(call) (*env)->call(env) +#define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1)) static JavaVM *jvm; static JNIEnv *env; @@ -359,11 +360,11 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) { return true; } +#if 0 // jvalue is known to be union of jobject and friends. And yet from C's // perspective, it's aggregate object which may require passing via stack // instead of registers. Work that around by passing jobject and typecasting // it. -#define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1)) STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) { if (arg == NULL || MATCH(jtypesig, "void")) { return mp_const_none; @@ -380,6 +381,7 @@ STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) { return MP_OBJ_NULL; } +#endif STATIC mp_obj_t call_method(jobject obj, const char *name, jarray methods, bool is_constr, mp_uint_t n_args, const mp_obj_t *args) { jvalue jargs[n_args]; |