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
Gwenaël Samain
cython
Commits
0a589021
Commit
0a589021
authored
Jul 07, 2015
by
Robert Bradshaw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tailmatch functions return Py_ssize_t, not int.
parent
e13fa642
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
9 deletions
+12
-9
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+12
-9
No files found.
Cython/Utility/StringTools.c
View file @
0a589021
...
...
@@ -535,12 +535,13 @@ static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar)
// tuple of prefixes/suffixes, whereas it's much more common to
// test for a single unicode string.
static
int
__Pyx_PyUnicode_Tailmatch
(
PyObject
*
s
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
static
Py_ssize_t
__Pyx_PyUnicode_Tailmatch
(
PyObject
*
s
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
if
(
unlikely
(
PyTuple_Check
(
substr
)))
{
Py_ssize_t
i
,
count
=
PyTuple_GET_SIZE
(
substr
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
in
t
result
;
Py_ssize_
t
result
;
#if CYTHON_COMPILING_IN_CPYTHON
result
=
PyUnicode_Tailmatch
(
s
,
PyTuple_GET_ITEM
(
substr
,
i
),
start
,
end
,
direction
);
...
...
@@ -562,14 +563,15 @@ static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
/////////////// bytes_tailmatch.proto ///////////////
static
int
__Pyx_PyBytes_SingleTailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
static
Py_ssize_t
__Pyx_PyBytes_SingleTailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
const
char
*
self_ptr
=
PyBytes_AS_STRING
(
self
);
Py_ssize_t
self_len
=
PyBytes_GET_SIZE
(
self
);
const
char
*
sub_ptr
;
Py_ssize_t
sub_len
;
in
t
retval
;
Py_ssize_
t
retval
;
Py_buffer
view
;
view
.
obj
=
NULL
;
...
...
@@ -619,13 +621,14 @@ static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg, Py_ssize
return
retval
;
}
static
int
__Pyx_PyBytes_Tailmatch
(
PyObject
*
self
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
static
Py_ssize_t
__Pyx_PyBytes_Tailmatch
(
PyObject
*
self
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
if
(
unlikely
(
PyTuple_Check
(
substr
)))
{
Py_ssize_t
i
,
count
=
PyTuple_GET_SIZE
(
substr
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
in
t
result
;
Py_ssize_
t
result
;
#if CYTHON_COMPILING_IN_CPYTHON
result
=
__Pyx_PyBytes_SingleTailmatch
(
self
,
PyTuple_GET_ITEM
(
substr
,
i
),
start
,
end
,
direction
);
...
...
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