Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
24d9175e
Commit
24d9175e
authored
Jul 21, 2009
by
Benjamin Peterson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
must use _PyThreadState_Current so it isn't checked for NULL #6530
parent
6adda964
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
Objects/dictobject.c
Objects/dictobject.c
+6
-4
No files found.
Objects/dictobject.c
View file @
24d9175e
...
...
@@ -712,10 +712,12 @@ PyDict_GetItem(PyObject *op, PyObject *key)
}
}
/* We can arrive here with a NULL tstate during initialization:
try running "python -Wi" for an example related to string
interning. Let's just hope that no exception occurs then... */
tstate
=
PyThreadState_GET
();
/* We can arrive here with a NULL tstate during initialization: try
running "python -Wi" for an example related to string interning.
Let's just hope that no exception occurs then... This must be
_PyThreadState_Current and not PyThreadState_GET() because in debug
mode, it complains if tstate is NULL. */
tstate
=
_PyThreadState_Current
;
if
(
tstate
!=
NULL
&&
tstate
->
curexc_type
!=
NULL
)
{
/* preserve the existing exception */
PyObject
*
err_type
,
*
err_value
,
*
err_tb
;
...
...
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