projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
32eb840
)
_tracemalloc: filename cannot be NULL
author
Victor Stinner
<victor.stinner@gmail.com>
Tue, 15 Mar 2016 13:28:04 +0000
(14:28 +0100)
committer
Victor Stinner
<victor.stinner@gmail.com>
Tue, 15 Mar 2016 13:28:04 +0000
(14:28 +0100)
Modules/_tracemalloc.c
patch
|
blob
|
history
diff --git
a/Modules/_tracemalloc.c
b/Modules/_tracemalloc.c
index d62e68254df393463906c997b834e7edb1301f62..2eb4dcad444f18196e1c1d5f19bc9176de23ff19 100644
(file)
--- a/
Modules/_tracemalloc.c
+++ b/
Modules/_tracemalloc.c
@@
-65,6
+65,8
@@
__attribute__((packed))
_declspec(align(4))
#endif
{
+ /* filename cannot be NULL: "<unknown>" is used if the Python frame
+ filename is NULL */
PyObject *filename;
int lineno;
} frame_t;
@@
-987,8
+989,6
@@
frame_to_pyobject(frame_t *frame)
if (frame_obj == NULL)
return NULL;
- if (frame->filename == NULL)
- frame->filename = Py_None;
Py_INCREF(frame->filename);
PyTuple_SET_ITEM(frame_obj, 0, frame->filename);