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
89a68b86
Commit
89a68b86
authored
Jun 11, 2020
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.29.x'
parents
1ebff687
caa52f6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
2 deletions
+14
-2
CHANGES.rst
CHANGES.rst
+10
-0
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+4
-2
No files found.
CHANGES.rst
View file @
89a68b86
...
...
@@ -453,6 +453,16 @@ Other changes
*
Support
for
Python
2.6
was
removed
.
0.29.21
(
2020
-
0
?-??)
====================
Bugs
fixed
----------
*
The
deprecated
C
-
API
function
``
PyUnicode_FromUnicode
()``
is
no
longer
usd
.
Original
patch
by
Inada
Naoki
.
(
Github
issue
#
3677
)
0.29.20
(
2020
-
06
-
10
)
====================
...
...
Cython/Utility/StringTools.c
View file @
89a68b86
...
...
@@ -495,6 +495,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
/////////////// decode_c_string ///////////////
//@requires: IncludeStringH
//@requires: decode_c_string_utf16
//@substitute: naming
/* duplicate code to avoid calling strlen() if start >= 0 and stop >= 0 */
static
CYTHON_INLINE
PyObject
*
__Pyx_decode_c_string
(
...
...
@@ -519,7 +520,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_string(
stop
+=
length
;
}
if
(
unlikely
(
stop
<=
start
))
return
PyUnicode_FromUnicode
(
NULL
,
0
);
return
__Pyx_NewRef
(
$
empty_unicode
);
length
=
stop
-
start
;
cstring
+=
start
;
if
(
decode_func
)
{
...
...
@@ -538,6 +539,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
/////////////// decode_c_bytes ///////////////
//@requires: decode_c_string_utf16
//@substitute: naming
static
CYTHON_INLINE
PyObject
*
__Pyx_decode_c_bytes
(
const
char
*
cstring
,
Py_ssize_t
length
,
Py_ssize_t
start
,
Py_ssize_t
stop
,
...
...
@@ -555,7 +557,7 @@ static CYTHON_INLINE PyObject* __Pyx_decode_c_bytes(
if
(
stop
>
length
)
stop
=
length
;
if
(
unlikely
(
stop
<=
start
))
return
PyUnicode_FromUnicode
(
NULL
,
0
);
return
__Pyx_NewRef
(
$
empty_unicode
);
length
=
stop
-
start
;
cstring
+=
start
;
if
(
decode_func
)
{
...
...
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