projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4140e11
)
fix surrogate pair calculation
author
Stefan Behnel
<scoder@users.berlios.de>
Sat, 5 Feb 2011 16:16:06 +0000
(17:16 +0100)
committer
Stefan Behnel
<scoder@users.berlios.de>
Sat, 5 Feb 2011 16:16:06 +0000
(17:16 +0100)
Cython/Compiler/PyrexTypes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/PyrexTypes.py
b/Cython/Compiler/PyrexTypes.py
index 07142349367bc1ba594a5a17c3e6bd106815a94f..6ed25191c00ed831ec1229be4a2f16181983478e 100755
(executable)
--- a/
Cython/Compiler/PyrexTypes.py
+++ b/
Cython/Compiler/PyrexTypes.py
@@
-965,7
+965,7
@@
static CYTHON_INLINE Py_UCS4 __Pyx_PyObject_AsPy_UCS4(PyObject* x) {
if (high_val >= 0xD800 && high_val <= 0xDBFF) {
Py_UCS4 low_val = PyUnicode_AS_UNICODE(x)[1];
if (low_val >= 0xDC00 && low_val <= 0xDFFF) {
- return 0x10000
| ((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1
));
+ return 0x10000
+ (((high_val & ((1<<10)-1)) << 10) | (low_val & ((1<<10)-1)
));
}
}
}