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
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
nexedi
cython
Commits
34aa95a4
Commit
34aa95a4
authored
Feb 12, 2008
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Real fix for builtins caching + coercion bug (as reported by paul.metcalfe@gmail.com)
parent
0cd67521
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+2
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+6
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
34aa95a4
...
...
@@ -773,6 +773,8 @@ class NameNode(AtomicExprNode):
if
entry
and
entry
.
is_cfunction
:
var_entry
=
entry
.
as_variable
if
var_entry
:
if
var_entry
.
is_builtin
and
Options
.
cache_builtins
:
var_entry
=
env
.
declare_builtin
(
var_entry
.
name
,
self
.
pos
)
node
=
NameNode
(
self
.
pos
,
name
=
self
.
name
)
node
.
entry
=
var_entry
node
.
analyse_rvalue_entry
(
env
)
...
...
Cython/Compiler/Symtab.py
View file @
34aa95a4
...
...
@@ -717,10 +717,15 @@ class ModuleScope(Scope):
return
self
.
outer_scope
.
declare_builtin
(
name
,
pos
)
else
:
error
(
pos
,
"undeclared name not builtin: %s"
%
name
)
entry
=
self
.
declare
(
name
,
name
,
py_object_type
,
pos
)
if
Options
.
cache_builtins
:
for
entry
in
self
.
cached_builtins
:
if
entry
.
name
==
name
:
return
entry
entry
=
self
.
declare
(
None
,
None
,
py_object_type
,
pos
)
if
Options
.
cache_builtins
:
entry
.
is_builtin
=
1
entry
.
is_const
=
1
entry
.
name
=
name
entry
.
cname
=
Naming
.
builtin_prefix
+
name
self
.
cached_builtins
.
append
(
entry
)
self
.
undeclared_cached_builtins
.
append
(
entry
)
...
...
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