Skip to content

Commit 02041bf

Browse files
committed
unix/modjni: jvalue2py() is currently not used.
Not remove so far, may be needed later.
1 parent 216b6a4 commit 02041bf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

unix/modjni.c

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@
3939

4040
#define JJ(call, ...) (*env)->call(env, __VA_ARGS__)
4141
#define JJ1(call) (*env)->call(env)
42+
#define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1))
4243

4344
static JavaVM *jvm;
4445
static JNIEnv *env;
@@ -359,11 +360,11 @@ STATIC bool py2jvalue(const char **jtypesig, mp_obj_t arg, jvalue *out) {
359360
return true;
360361
}
361362

363+
#if 0
362364
// jvalue is known to be union of jobject and friends. And yet from C's
363365
// perspective, it's aggregate object which may require passing via stack
364366
// instead of registers. Work that around by passing jobject and typecasting
365367
// it.
366-
#define MATCH(s, static) (!strncmp(s, static, sizeof(static) - 1))
367368
STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) {
368369
if (arg == NULL || MATCH(jtypesig, "void")) {
369370
return mp_const_none;
@@ -380,6 +381,7 @@ STATIC mp_obj_t jvalue2py(const char *jtypesig, jobject arg) {
380381

381382
return MP_OBJ_NULL;
382383
}
384+
#endif
383385

384386
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) {
385387
jvalue jargs[n_args];

0 commit comments

Comments
 (0)