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
7cd7d23d
Commit
7cd7d23d
authored
May 10, 2008
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
unicode fixes
parent
c786d3c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
7 deletions
+3
-7
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+3
-7
No files found.
Cython/Compiler/Nodes.py
View file @
7cd7d23d
...
@@ -4312,11 +4312,7 @@ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
...
@@ -4312,11 +4312,7 @@ static int __Pyx_InternStrings(__Pyx_InternTabEntry *t); /*proto*/
"""
,
"""
"""
,
"""
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
static int __Pyx_InternStrings(__Pyx_InternTabEntry *t) {
while (t->p) {
while (t->p) {
#if PY_MAJOR_VERSION < 3
*t->p = PyString_InternFromString(t->s);
*t->p = PyString_InternFromString(t->s);
#else
*t->p = PyUnicode_InternFromString(t->s);
#endif
if (!*t->p)
if (!*t->p)
return -1;
return -1;
++t;
++t;
...
@@ -4334,13 +4330,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
...
@@ -4334,13 +4330,13 @@ static int __Pyx_InitStrings(__Pyx_StringTabEntry *t); /*proto*/
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
static int __Pyx_InitStrings(__Pyx_StringTabEntry *t) {
while (t->p) {
while (t->p) {
if (t->is_unicode) {
if (t->is_unicode) {
*t->p = PyUnicode_DecodeUTF8(t->s, t->n - 1, NULL);
} else {
#if PY_MAJOR_VERSION < 3
#if PY_MAJOR_VERSION < 3
*t->p = Py
String_FromStringAndSize(t->s, t->n - 1
);
*t->p = Py
Unicode_DecodeUTF8(t->s, t->n - 1, NULL
);
#else
#else
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
*t->p = PyUnicode_FromStringAndSize(t->s, t->n - 1);
#endif
#endif
} else {
*t->p = PyString_FromStringAndSize(t->s, t->n - 1);
}
}
if (!*t->p)
if (!*t->p)
return -1;
return -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