@@ -33,7 +33,7 @@ from ..cpp.types.callable_type cimport callable_type as _callable_type
3333from ..cpp.types.string_type cimport string_type
3434from ..cpp.types.bytes_type cimport bytes_type
3535from ..cpp.types.fixed_bytes_type cimport fixed_bytes_type
36- from ..cpp.type cimport make_type
36+ from ..cpp.type cimport make_type, _get_reg_info
3737from ..cpp.complex cimport complex as dynd_complex
3838
3939from ..config cimport translate_exception
@@ -399,8 +399,6 @@ cdef _type as_cpp_type(object o) except *:
399399 elif _builtin_type(o) is str or PyUnicode_Check(< PyObject* > o):
400400 # Use Cython's automatic conversion to c++ strings.
401401 return _type(< string> o)
402- elif _builtin_type(o) is int or _builtin_type(o) is long :
403- return _type(< type_id_t> (< int > o))
404402 elif is_numpy_dtype(< PyObject* > o):
405403 return _type_from_numpy_dtype(< PyArray_Descr* > o)
406404 elif issubclass (o, _ctypes_base_type):
@@ -718,7 +716,8 @@ cdef as_numba_type(_type tp):
718716 return _to_numba_type[tp.get_id()]
719717
720718cdef _type from_numba_type(tp):
721- return _type(< type_id_t> _from_numba_type[tp])
719+
720+ return _get_reg_info((< type_id_t> _from_numba_type[tp])).tp
722721
723722cdef _type cpp_type_for(object obj) except * :
724723 cdef _type tp = xtype_for_prefix(obj)
0 commit comments