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
Kirill Smelkov
cython
Commits
2c517ecc
Commit
2c517ecc
authored
Sep 29, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prevent dict lookup with live exception when looking up names from class namespaces.
parent
4ec842c7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
2 deletions
+15
-2
Cython/Utility/ObjectHandling.c
Cython/Utility/ObjectHandling.c
+15
-2
No files found.
Cython/Utility/ObjectHandling.c
View file @
2c517ecc
...
@@ -1019,12 +1019,25 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*prot
...
@@ -1019,12 +1019,25 @@ static PyObject *__Pyx_GetNameInClass(PyObject *nmspace, PyObject *name); /*prot
/////////////// GetNameInClass ///////////////
/////////////// GetNameInClass ///////////////
//@requires: PyObjectGetAttrStr
//@requires: PyObjectGetAttrStr
//@requires: GetModuleGlobalName
//@requires: GetModuleGlobalName
//@requires: Exceptions.c::PyThreadStateGet
//@requires: Exceptions.c::PyErrFetchRestore
//@requires: Exceptions.c::PyErrExceptionMatches
static
PyObject
*
__Pyx_GetGlobalNameAfterAttributeLookup
(
PyObject
*
name
)
{
__Pyx_PyThreadState_declare
__Pyx_PyThreadState_assign
if
(
unlikely
(
!
__Pyx_PyErr_ExceptionMatches
(
PyExc_AttributeError
)))
return
NULL
;
__Pyx_PyErr_Clear
();
return
__Pyx_GetModuleGlobalName
(
name
);
}
static
PyObject
*
__Pyx_GetNameInClass
(
PyObject
*
nmspace
,
PyObject
*
name
)
{
static
PyObject
*
__Pyx_GetNameInClass
(
PyObject
*
nmspace
,
PyObject
*
name
)
{
PyObject
*
result
;
PyObject
*
result
;
result
=
__Pyx_PyObject_GetAttrStr
(
nmspace
,
name
);
result
=
__Pyx_PyObject_GetAttrStr
(
nmspace
,
name
);
if
(
!
result
)
if
(
!
result
)
{
result
=
__Pyx_GetModuleGlobalName
(
name
);
result
=
__Pyx_GetGlobalNameAfterAttributeLookup
(
name
);
}
return
result
;
return
result
;
}
}
...
...
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