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
Boxiang Sun
cython
Commits
723e6ada
Commit
723e6ada
authored
Apr 11, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
disambiguate utility code name
parent
3c470973
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+3
-3
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+2
-2
Cython/Utility/StringTools.c
Cython/Utility/StringTools.c
+1
-1
No files found.
Cython/Compiler/ExprNodes.py
View file @
723e6ada
...
...
@@ -10645,18 +10645,18 @@ class CmpNode(object):
if
self
.
operand2
.
type
is
Builtin
.
dict_type
:
self
.
operand2
=
self
.
operand2
.
as_none_safe_node
(
"'NoneType' object is not iterable"
)
self
.
special_bool_cmp_utility_code
=
UtilityCode
.
load_cached
(
"PyDictContains"
,
"ObjectHandling.c"
)
self
.
special_bool_cmp_function
=
"__Pyx_PyDict_Contains"
self
.
special_bool_cmp_function
=
"__Pyx_PyDict_Contains
TF
"
return
True
elif
self
.
operand2
.
type
is
Builtin
.
unicode_type
:
self
.
operand2
=
self
.
operand2
.
as_none_safe_node
(
"'NoneType' object is not iterable"
)
self
.
special_bool_cmp_utility_code
=
UtilityCode
.
load_cached
(
"PyUnicodeContains"
,
"StringTools.c"
)
self
.
special_bool_cmp_function
=
"__Pyx_PyUnicode_Contains"
self
.
special_bool_cmp_function
=
"__Pyx_PyUnicode_Contains
TF
"
return
True
else
:
if
not
self
.
operand2
.
type
.
is_pyobject
:
self
.
operand2
=
self
.
operand2
.
coerce_to_pyobject
(
env
)
self
.
special_bool_cmp_utility_code
=
UtilityCode
.
load_cached
(
"PySequenceContains"
,
"ObjectHandling.c"
)
self
.
special_bool_cmp_function
=
"__Pyx_PySequence_Contains"
self
.
special_bool_cmp_function
=
"__Pyx_PySequence_Contains
TF
"
return
True
return
False
...
...
Cython/Utility/ObjectHandling.c
View file @
723e6ada
...
...
@@ -928,14 +928,14 @@ static CYTHON_INLINE int __Pyx_TypeTest(PyObject *obj, PyTypeObject *type) {
/////////////// PyDictContains.proto ///////////////
static
CYTHON_INLINE
int
__Pyx_PyDict_Contains
(
PyObject
*
item
,
PyObject
*
dict
,
int
eq
)
{
static
CYTHON_INLINE
int
__Pyx_PyDict_Contains
TF
(
PyObject
*
item
,
PyObject
*
dict
,
int
eq
)
{
int
result
=
PyDict_Contains
(
dict
,
item
);
return
unlikely
(
result
<
0
)
?
result
:
(
result
==
(
eq
==
Py_EQ
));
}
/////////////// PySequenceContains.proto ///////////////
static
CYTHON_INLINE
int
__Pyx_PySequence_Contains
(
PyObject
*
item
,
PyObject
*
seq
,
int
eq
)
{
static
CYTHON_INLINE
int
__Pyx_PySequence_Contains
TF
(
PyObject
*
item
,
PyObject
*
seq
,
int
eq
)
{
int
result
=
PySequence_Contains
(
seq
,
item
);
return
unlikely
(
result
<
0
)
?
result
:
(
result
==
(
eq
==
Py_EQ
));
}
...
...
Cython/Utility/StringTools.c
View file @
723e6ada
...
...
@@ -111,7 +111,7 @@ static CYTHON_INLINE int __Pyx_PyUnicodeBufferContainsUCS4(Py_UNICODE* buffer, P
//////////////////// PyUnicodeContains.proto ////////////////////
static
CYTHON_INLINE
int
__Pyx_PyUnicode_Contains
(
PyObject
*
substring
,
PyObject
*
text
,
int
eq
)
{
static
CYTHON_INLINE
int
__Pyx_PyUnicode_Contains
TF
(
PyObject
*
substring
,
PyObject
*
text
,
int
eq
)
{
int
result
=
PyUnicode_Contains
(
text
,
substring
);
return
unlikely
(
result
<
0
)
?
result
:
(
result
==
(
eq
==
Py_EQ
));
}
...
...
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