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
923aaab7
Commit
923aaab7
authored
Apr 14, 2012
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
minor code cleanup
parent
ec0ce7d3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
7 deletions
+4
-7
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+4
-7
No files found.
Cython/Utility/StringTools.c
View file @
923aaab7
...
@@ -29,14 +29,11 @@ static CYTHON_INLINE int __Pyx_PyUnicodeBufferContainsUCS4(Py_UNICODE* buffer, P
...
@@ -29,14 +29,11 @@ static CYTHON_INLINE int __Pyx_PyUnicodeBufferContainsUCS4(Py_UNICODE* buffer, P
static
CYTHON_INLINE
int
__Pyx_UnicodeContainsUCS4
(
PyObject
*
unicode
,
Py_UCS4
character
)
{
static
CYTHON_INLINE
int
__Pyx_UnicodeContainsUCS4
(
PyObject
*
unicode
,
Py_UCS4
character
)
{
#if CYTHON_PEP393_ENABLED
#if CYTHON_PEP393_ENABLED
Py_ssize_t
i
;
const
int
kind
=
PyUnicode_KIND
(
unicode
);
int
kind
;
void
*
udata
;
Py_ssize_t
length
;
kind
=
PyUnicode_KIND
(
unicode
);
if
(
likely
(
kind
!=
PyUnicode_WCHAR_KIND
))
{
if
(
likely
(
kind
!=
PyUnicode_WCHAR_KIND
))
{
udata
=
PyUnicode_DATA
(
unicode
);
Py_ssize_t
i
;
length
=
PyUnicode_GET_LENGTH
(
unicode
);
const
void
*
udata
=
PyUnicode_DATA
(
unicode
);
const
Py_ssize_t
length
=
PyUnicode_GET_LENGTH
(
unicode
);
for
(
i
=
0
;
i
<
length
;
i
++
)
{
for
(
i
=
0
;
i
<
length
;
i
++
)
{
if
(
unlikely
(
character
==
PyUnicode_READ
(
kind
,
udata
,
i
)))
return
1
;
if
(
unlikely
(
character
==
PyUnicode_READ
(
kind
,
udata
,
i
)))
return
1
;
}
}
...
...
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