summaryrefslogtreecommitdiff
path: root/coverage
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2016-11-12 16:22:24 -0500
committerNed Batchelder <ned@nedbatchelder.com>2016-11-12 16:22:24 -0500
commitcb5c0ffe6bef8b43bb1e22a3576e535dd0bf89fd (patch)
tree0a998ed29fb8e6956edad10789ee9878e45ea3be /coverage
parent499d4b06a6c13f339cc4b49626ce1c200533864f (diff)
downloadpython-coveragepy-cb5c0ffe6bef8b43bb1e22a3576e535dd0bf89fd.tar.gz
Allow for the possibility of null-testing
Diffstat (limited to 'coverage')
-rw-r--r--coverage/ctracer/tracer.c8
-rw-r--r--coverage/ctracer/util.h1
2 files changed, 9 insertions, 0 deletions
diff --git a/coverage/ctracer/tracer.c b/coverage/ctracer/tracer.c
index ac16b6b..bfaa74e 100644
--- a/coverage/ctracer/tracer.c
+++ b/coverage/ctracer/tracer.c
@@ -824,6 +824,10 @@ CTracer_trace(CTracer *self, PyFrameObject *frame, int what, PyObject *arg_unuse
{
int ret = RET_ERROR;
+ #if DO_NOTHING
+ return RET_OK;
+ #endif
+
#if WHAT_LOG || TRACE_LOG
PyObject * ascii = NULL;
#endif
@@ -922,6 +926,10 @@ CTracer_call(CTracer *self, PyObject *args, PyObject *kwds)
PyObject *ret = NULL;
PyObject * ascii = NULL;
+ #if DO_NOTHING
+ CRASH
+ #endif
+
static char *what_names[] = {
"call", "exception", "line", "return",
"c_call", "c_exception", "c_return",
diff --git a/coverage/ctracer/util.h b/coverage/ctracer/util.h
index 678eb6c..e192f97 100644
--- a/coverage/ctracer/util.h
+++ b/coverage/ctracer/util.h
@@ -10,6 +10,7 @@
#undef WHAT_LOG /* Define to log the WHAT params in the trace function. */
#undef TRACE_LOG /* Define to log our bookkeeping. */
#undef COLLECT_STATS /* Collect counters: stats are printed when tracer is stopped. */
+#undef DO_NOTHING /* Define this to make the tracer do nothing. */
/* Py 2.x and 3.x compatibility */