mirror of https://github.com/kivy/pyjnius.git
Fix 159: passing the result of autoclass to java.lang.Class parameter.
This commit is contained in:
parent
a54772835c
commit
6d91a2fe62
|
@ -278,6 +278,11 @@ cdef int calculate_score(sign_args, args, is_varargs=False) except *:
|
||||||
continue
|
continue
|
||||||
return -1
|
return -1
|
||||||
|
|
||||||
|
# accept an autoclass class for java/lang/Class.
|
||||||
|
if hasattr(arg, '__javaclass__') and r == 'java/lang/Class':
|
||||||
|
score += 10
|
||||||
|
continue
|
||||||
|
|
||||||
# if we pass a JavaClass, ensure the definition is matching
|
# if we pass a JavaClass, ensure the definition is matching
|
||||||
# XXX FIXME what if we use a subclass or something ?
|
# XXX FIXME what if we use a subclass or something ?
|
||||||
if isinstance(arg, JavaClass):
|
if isinstance(arg, JavaClass):
|
||||||
|
|
Loading…
Reference in New Issue