summaryrefslogtreecommitdiff
path: root/coverage/ctracer/tracer.c
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-01-30 15:46:05 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-01-30 15:46:05 -0500
commit60297f4fda470bc7d44de20384efd96fbbaea7de (patch)
tree711b8ec91ad5daf3b8661a4bcae8423c3f54a836 /coverage/ctracer/tracer.c
parentd31c2f3b6e422b85df6ff9e46f9fcf646cc0c15a (diff)
downloadpython-coveragepy-git-60297f4fda470bc7d44de20384efd96fbbaea7de.tar.gz
Clean up WTW so that it is safe to merge
Diffstat (limited to 'coverage/ctracer/tracer.c')
-rw-r--r--coverage/ctracer/tracer.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/coverage/ctracer/tracer.c b/coverage/ctracer/tracer.c
index 42587b1e..3266ff2f 100644
--- a/coverage/ctracer/tracer.c
+++ b/coverage/ctracer/tracer.c
@@ -353,7 +353,7 @@ CTracer_handle_call(CTracer *self, PyFrameObject *frame)
self->pdata_stack->stack[self->pdata_stack->depth] = self->cur_entry;
/* See if this frame begins a new context. */
- if (self->should_start_context != Py_None && self->context == Py_None) {
+ if (self->should_start_context && self->context == Py_None) {
PyObject * context;
/* We're looking for our context, ask should_start_context if this is the start. */
STATS( self->stats.start_context_calls++; )
@@ -1067,7 +1067,7 @@ CTracer_members[] = {
{ "should_start_context", T_OBJECT, offsetof(CTracer, should_start_context), 0,
PyDoc_STR("Function for starting contexts.") },
- { "switch_context", T_OBJECT, offsetof(CTracer, switch_context), 0,
+ { "switch_context", T_OBJECT, offsetof(CTracer, switch_context), 0,
PyDoc_STR("Function for switch to a new context.") },
{ NULL }