File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -800,6 +800,11 @@ native Julia type (defaulting to `default`) that we convert
800800function pytype_query (o:: PyObject , default:: TypeTuple = PyObject)
801801 # TODO : Use some kind of hashtable (e.g. based on PyObject_Type(o)).
802802 # (A bit tricky to correctly handle Tuple and other containers.)
803+ for (py,jl) in pytype_queries
804+ if pyisinstance (o, py)
805+ return jl
806+ end
807+ end
803808 @return_not_None pyint_query (o)
804809 pyisinstance (o, npy_bool) && return Bool
805810 @return_not_None pyfloat_query (o)
@@ -812,11 +817,6 @@ function pytype_query(o::PyObject, default::TypeTuple=PyObject)
812817 @return_not_None pysequence_query (o)
813818 @return_not_None pynothing_query (o)
814819 @return_not_None pymp_query (o)
815- for (py,jl) in pytype_queries
816- if pyisinstance (o, py)
817- return jl
818- end
819- end
820820 return default
821821end
822822
You can’t perform that action at this time.
0 commit comments