Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
1cc7b13d
Commit
1cc7b13d
authored
Jun 08, 2018
by
Claudio Freire
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix purepython builtin type strings
parent
645e717e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
1 deletion
+17
-1
CHANGES.rst
CHANGES.rst
+3
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+7
-1
tests/compile/builtinbuffer.py
tests/compile/builtinbuffer.py
+7
-0
No files found.
CHANGES.rst
View file @
1cc7b13d
...
@@ -40,6 +40,9 @@ Bugs fixed
...
@@ -40,6 +40,9 @@ Bugs fixed
Note that this can have a performance impact on calls from Cython code.
Note that this can have a performance impact on calls from Cython code.
(Github issue #1771)
(Github issue #1771)
* Fix declarations of builtin or C types using strings in pure python mode.
(Github issue #2046)
Other changes
Other changes
-------------
-------------
...
...
Cython/Compiler/ExprNodes.py
View file @
1cc7b13d
...
@@ -1377,7 +1377,13 @@ def _analyse_name_as_type(name, pos, env):
...
@@ -1377,7 +1377,13 @@ def _analyse_name_as_type(name, pos, env):
return
type
return
type
global_entry
=
env
.
global_scope
().
lookup_here
(
name
)
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
return
global_entry
.
type
from
.TreeFragment
import
TreeFragment
from
.TreeFragment
import
TreeFragment
...
...
tests/compile/builtinbuffer.py
0 → 100644
View file @
1cc7b13d
# mode: compile
import
cython
@
cython
.
cclass
class
BuiltinRef
:
cython
.
declare
(
pybuf
=
'Py_buffer'
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment