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
40979aa8
Commit
40979aa8
authored
May 21, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
builtin names must be EncodedStrings as they get reused
parent
11b2d3a3
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
0 deletions
+5
-0
Cython/Compiler/Symtab.py
Cython/Compiler/Symtab.py
+5
-0
No files found.
Cython/Compiler/Symtab.py
View file @
40979aa8
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
#
#
import
re
import
re
from
Cython
import
Utils
from
Errors
import
warning
,
error
,
InternalError
from
Errors
import
warning
,
error
,
InternalError
import
Options
import
Options
import
Naming
import
Naming
...
@@ -611,11 +612,14 @@ class BuiltinScope(Scope):
...
@@ -611,11 +612,14 @@ class BuiltinScope(Scope):
utility_code = None):
utility_code = None):
# If python_equiv == "
*
", the Python equivalent has the same name
# If python_equiv == "
*
", the Python equivalent has the same name
# as the entry, otherwise it has the name specified by python_equiv.
# as the entry, otherwise it has the name specified by python_equiv.
name = Utils.EncodedString(name)
entry = self.declare_cfunction(name, type, None, cname)
entry = self.declare_cfunction(name, type, None, cname)
entry.utility_code = utility_code
entry.utility_code = utility_code
if python_equiv:
if python_equiv:
if python_equiv == "
*
":
if python_equiv == "
*
":
python_equiv = name
python_equiv = name
else:
python_equiv = Utils.EncodedString(python_equiv)
var_entry = Entry(python_equiv, python_equiv, py_object_type)
var_entry = Entry(python_equiv, python_equiv, py_object_type)
var_entry.is_variable = 1
var_entry.is_variable = 1
var_entry.is_builtin = 1
var_entry.is_builtin = 1
...
@@ -623,6 +627,7 @@ class BuiltinScope(Scope):
...
@@ -623,6 +627,7 @@ class BuiltinScope(Scope):
return entry
return entry
def declare_builtin_type(self, name, cname):
def declare_builtin_type(self, name, cname):
name = Utils.EncodedString(name)
type = PyrexTypes.BuiltinObjectType(name, cname)
type = PyrexTypes.BuiltinObjectType(name, cname)
type.set_scope(CClassScope(name, outer_scope=None, visibility='extern'))
type.set_scope(CClassScope(name, outer_scope=None, visibility='extern'))
self.type_names[name] = 1
self.type_names[name] = 1
...
...
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