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
Boxiang Sun
cython
Commits
8d3d6952
Commit
8d3d6952
authored
Jun 09, 2018
by
scoder
Committed by
GitHub
Jun 09, 2018
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2317 from klaussfreire/fix_purepython_builtin_type_strings
Fix purepython builtin type strings
parents
645e717e
1cc7b13d
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 @
8d3d6952
...
@@ -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 @
8d3d6952
...
@@ -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 @
8d3d6952
# 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