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
eb423c09
Commit
eb423c09
authored
Feb 22, 2015
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avoid using PyDict_GetItemWithError in pypy3 (missing in its cpyext emulation)
parent
54693f22
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+1
-1
Cython/Utility/Optimize.c
Cython/Utility/Optimize.c
+2
-2
No files found.
Cython/Utility/ObjectHandling.c
View file @
eb423c09
...
...
@@ -225,7 +225,7 @@ static CYTHON_INLINE int __Pyx_IterFinish(void) {
/////////////// DictGetItem.proto ///////////////
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
&& !CYTHON_COMPILING_IN_PYPY
static
PyObject
*
__Pyx_PyDict_GetItem
(
PyObject
*
d
,
PyObject
*
key
)
{
PyObject
*
value
;
value
=
PyDict_GetItemWithError
(
d
,
key
);
...
...
Cython/Utility/Optimize.c
View file @
eb423c09
...
...
@@ -161,7 +161,7 @@ static PyObject* __Pyx_PyDict_GetItemDefault(PyObject* d, PyObject* key, PyObjec
static
PyObject
*
__Pyx_PyDict_GetItemDefault
(
PyObject
*
d
,
PyObject
*
key
,
PyObject
*
default_value
)
{
PyObject
*
value
;
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
&& !CYTHON_COMPILING_IN_PYPY
value
=
PyDict_GetItemWithError
(
d
,
key
);
if
(
unlikely
(
!
value
))
{
if
(
unlikely
(
PyErr_Occurred
()))
...
...
@@ -207,7 +207,7 @@ static CYTHON_INLINE PyObject *__Pyx_PyDict_SetDefault(PyObject *d, PyObject *ke
#else
if
(
is_safe_type
==
1
||
(
is_safe_type
==
-
1
&&
/* the following builtins presumably have repeatably safe and fast hash functions */
#if PY_MAJOR_VERSION >= 3
#if PY_MAJOR_VERSION >= 3
&& !CYTHON_COMPILING_IN_PYPY
(
PyUnicode_CheckExact
(
key
)
||
PyString_CheckExact
(
key
)
||
PyLong_CheckExact
(
key
))))
{
value
=
PyDict_GetItemWithError
(
d
,
key
);
if
(
unlikely
(
!
value
))
{
...
...
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