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
e351aa7d
Commit
e351aa7d
authored
Mar 05, 2013
by
Nikita Nemkin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More pyunicode_ptr renames.
parent
093303d0
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
Cython/Compiler/Code.py
Cython/Compiler/Code.py
+4
-4
No files found.
Cython/Compiler/Code.py
View file @
e351aa7d
...
...
@@ -873,7 +873,7 @@ class GlobalState(object):
self.const_cname_counter = 1
self.string_const_index = {}
self.
unicode
_const_index = {}
self.
pyunicode_ptr
_const_index = {}
self.int_const_index = {}
self.py_constants = []
...
...
@@ -1021,9 +1021,9 @@ class GlobalState(object):
# return a Py_UNICODE[] constant, creating a new one if necessary
assert
text
.
is_unicode
try
:
c
=
self
.
unicode
_const_index
[
text
]
c
=
self
.
pyunicode_ptr
_const_index
[
text
]
except
KeyError
:
c
=
self
.
unicode
_const_index
[
text
]
=
self
.
new_const_cname
()
c
=
self
.
pyunicode_ptr
_const_index
[
text
]
=
self
.
new_const_cname
()
return
c
def
get_py_string_const
(
self
,
text
,
identifier
=
None
,
...
...
@@ -1151,7 +1151,7 @@ class GlobalState(object):
for
py_string
in
c
.
py_strings
.
values
():
py_strings
.
append
((
c
.
cname
,
len
(
py_string
.
cname
),
py_string
))
for
c
,
cname
in
self
.
unicode
_const_index
.
items
():
for
c
,
cname
in
self
.
pyunicode_ptr
_const_index
.
items
():
utf16_array
,
utf32_array
=
StringEncoding
.
encode_pyunicode_string
(
c
)
if
utf16_array
:
# Narrow and wide representations differ
...
...
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