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
fd5186d4
Commit
fd5186d4
authored
Jul 07, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
move some utility code to the back of the file
parent
9962ade0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
3 deletions
+19
-3
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+19
-3
No files found.
Cython/Utility/StringTools.c
View file @
fd5186d4
...
@@ -531,6 +531,12 @@ static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar)
...
@@ -531,6 +531,12 @@ static CYTHON_INLINE int __Pyx_Py_UNICODE_ISTITLE(Py_UCS4 uchar)
/////////////// unicode_tailmatch.proto ///////////////
/////////////// unicode_tailmatch.proto ///////////////
static
int
__Pyx_PyUnicode_Tailmatch
(
PyObject
*
s
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
);
/*proto*/
/////////////// unicode_tailmatch ///////////////
// Python's unicode.startswith() and unicode.endswith() support a
// Python's unicode.startswith() and unicode.endswith() support a
// tuple of prefixes/suffixes, whereas it's much more common to
// tuple of prefixes/suffixes, whereas it's much more common to
// test for a single unicode string.
// test for a single unicode string.
...
@@ -562,6 +568,13 @@ static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
...
@@ -562,6 +568,13 @@ static int __Pyx_PyUnicode_Tailmatch(PyObject* s, PyObject* substr,
/////////////// bytes_tailmatch.proto ///////////////
/////////////// bytes_tailmatch.proto ///////////////
static
int
__Pyx_PyBytes_SingleTailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
);
/*proto*/
static
int
__Pyx_PyBytes_Tailmatch
(
PyObject
*
self
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
);
/*proto*/
/////////////// bytes_tailmatch ///////////////
static
int
__Pyx_PyBytes_SingleTailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
static
int
__Pyx_PyBytes_SingleTailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
const
char
*
self_ptr
=
PyBytes_AS_STRING
(
self
);
const
char
*
self_ptr
=
PyBytes_AS_STRING
(
self
);
...
@@ -619,8 +632,7 @@ static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
...
@@ -619,8 +632,7 @@ static int __Pyx_PyBytes_SingleTailmatch(PyObject* self, PyObject* arg,
}
}
static
int
__Pyx_PyBytes_Tailmatch
(
PyObject
*
self
,
PyObject
*
substr
,
static
int
__Pyx_PyBytes_Tailmatch
(
PyObject
*
self
,
PyObject
*
substr
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
)
{
{
if
(
unlikely
(
PyTuple_Check
(
substr
)))
{
if
(
unlikely
(
PyTuple_Check
(
substr
)))
{
Py_ssize_t
i
,
count
=
PyTuple_GET_SIZE
(
substr
);
Py_ssize_t
i
,
count
=
PyTuple_GET_SIZE
(
substr
);
for
(
i
=
0
;
i
<
count
;
i
++
)
{
for
(
i
=
0
;
i
<
count
;
i
++
)
{
...
@@ -648,7 +660,7 @@ static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
...
@@ -648,7 +660,7 @@ static int __Pyx_PyBytes_Tailmatch(PyObject* self, PyObject* substr,
/////////////// str_tailmatch.proto ///////////////
/////////////// str_tailmatch.proto ///////////////
static
CYTHON_INLINE
int
__Pyx_PyStr_Tailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
static
CYTHON_INLINE
int
__Pyx_PyStr_Tailmatch
(
PyObject
*
self
,
PyObject
*
arg
,
Py_ssize_t
start
,
Py_ssize_t
end
,
int
direction
);
Py_ssize_t
end
,
int
direction
);
/*proto*/
/////////////// str_tailmatch ///////////////
/////////////// str_tailmatch ///////////////
//@requires: bytes_tailmatch
//@requires: bytes_tailmatch
...
@@ -670,6 +682,10 @@ static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py
...
@@ -670,6 +682,10 @@ static CYTHON_INLINE int __Pyx_PyStr_Tailmatch(PyObject* self, PyObject* arg, Py
/////////////// bytes_index.proto ///////////////
/////////////// bytes_index.proto ///////////////
static
CYTHON_INLINE
char
__Pyx_PyBytes_GetItemInt
(
PyObject
*
bytes
,
Py_ssize_t
index
,
int
check_bounds
);
/*proto*/
/////////////// bytes_index ///////////////
static
CYTHON_INLINE
char
__Pyx_PyBytes_GetItemInt
(
PyObject
*
bytes
,
Py_ssize_t
index
,
int
check_bounds
)
{
static
CYTHON_INLINE
char
__Pyx_PyBytes_GetItemInt
(
PyObject
*
bytes
,
Py_ssize_t
index
,
int
check_bounds
)
{
if
(
check_bounds
)
{
if
(
check_bounds
)
{
Py_ssize_t
size
=
PyBytes_GET_SIZE
(
bytes
);
Py_ssize_t
size
=
PyBytes_GET_SIZE
(
bytes
);
...
...
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