Commit 1cc7b13d authored by Claudio Freire's avatar Claudio Freire

Fix purepython builtin type strings

parent 645e717e
......@@ -40,6 +40,9 @@ Bugs fixed
Note that this can have a performance impact on calls from Cython code.
(Github issue #1771)
* Fix declarations of builtin or C types using strings in pure python mode.
(Github issue #2046)
Other changes
-------------
......
......@@ -1377,7 +1377,13 @@ def _analyse_name_as_type(name, pos, env):
return type
global_entry = env.global_scope().lookup_here(name)
if global_entry and global_entry.type and global_entry.type.is_extension_type:
if global_entry is None:
global_entry = env.builtin_scope().lookup_here(name)
if global_entry and global_entry.type and (
global_entry.type.is_extension_type
or global_entry.type.is_struct_or_union
or global_entry.type.is_builtin_type
or global_entry.type.is_cpp_class):
return global_entry.type
from .TreeFragment import TreeFragment
......
# mode: compile
import cython
@cython.cclass
class BuiltinRef:
cython.declare(pybuf = 'Py_buffer')
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment