mirror of https://github.com/kivy/pyjnius.git
Add PythonJavaClass special case to subclasscheck.
This commit is contained in:
parent
50b66da8d4
commit
de76124bfc
|
@ -128,7 +128,15 @@ class MetaJavaClass(MetaJavaBase):
|
|||
if jcs is not None:
|
||||
obj = jcs.j_cls
|
||||
|
||||
if NULL != obj:
|
||||
if NULL == obj:
|
||||
if isinstance(value, PythonJavaClass):
|
||||
for interface in getattr(value, '__javainterfaces__', []):
|
||||
obj = j_env[0].FindClass(j_env, interface)
|
||||
if obj == NULL:
|
||||
j_env[0].ExceptionClear(j_env)
|
||||
elif 0 != j_env[0].IsAssignableFrom(j_env, obj, me.j_cls):
|
||||
return True
|
||||
else:
|
||||
if 0 != j_env[0].IsAssignableFrom(j_env, obj, me.j_cls):
|
||||
return True
|
||||
|
||||
|
|
Loading…
Reference in New Issue