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
Gwenaël Samain
cython
Commits
1ae3e5c5
Commit
1ae3e5c5
authored
15 years ago
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix builtins after identifier changes
parent
54940d92
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+4
-1
No files found.
Cython/Compiler/Code.py
View file @
1ae3e5c5
...
@@ -559,6 +559,9 @@ class GlobalState(object):
...
@@ -559,6 +559,9 @@ class GlobalState(object):
py_string = c_string.get_py_string_const(text.encoding, identifier, is_str)
py_string = c_string.get_py_string_const(text.encoding, identifier, is_str)
return py_string
return py_string
def get_interned_identifier(self, text):
return self.get_py_string_const(text, identifier=True)
def new_string_const(self, text, byte_string):
def new_string_const(self, text, byte_string):
cname = self.new_string_const_cname(byte_string)
cname = self.new_string_const_cname(byte_string)
c = StringConst(cname, text, byte_string)
c = StringConst(cname, text, byte_string)
...
@@ -604,7 +607,7 @@ class GlobalState(object):
...
@@ -604,7 +607,7 @@ class GlobalState(object):
def add_cached_builtin_decl(self, entry):
def add_cached_builtin_decl(self, entry):
if Options.cache_builtins:
if Options.cache_builtins:
if self.should_declare(entry.cname, entry):
if self.should_declare(entry.cname, entry):
interned_cname = self.
intern
_identifier(entry.name).cname
interned_cname = self.
get_interned
_identifier(entry.name).cname
self.put_pyobject_decl(entry)
self.put_pyobject_decl(entry)
w = self.parts['cached_builtins']
w = self.parts['cached_builtins']
w.putln('%s = __Pyx_GetName(%s, %s); if (!%s) %s' % (
w.putln('%s = __Pyx_GetName(%s, %s); if (!%s) %s' % (
...
...
This diff is collapsed.
Click to expand it.
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