projects
/
platform
/
upstream
/
python-cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
20f6730
)
keep constant_result when coercing string to char
author
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 12 May 2013 12:07:03 +0000
(14:07 +0200)
committer
Stefan Behnel
<stefan_ml@behnel.de>
Sun, 12 May 2013 12:07:03 +0000
(14:07 +0200)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index
f11c73a
..
860cda8
100755
(executable)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-1154,7
+1154,8
@@
class BytesNode(ConstNode):
if dst_type.is_unicode_char:
error(self.pos, "Bytes literals cannot coerce to Py_UNICODE/Py_UCS4, use a unicode literal instead.")
return self
- return CharNode(self.pos, value=self.value)
+ return CharNode(self.pos, value=self.value,
+ constant_result=ord(self.value))
node = BytesNode(self.pos, value=self.value)
if dst_type.is_pyobject: