diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-04 07:35:40 -0500 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2012-11-04 07:35:40 -0500 |
commit | 0d605622213a0f4405ddc9b15dadbfb7af676c82 (patch) | |
tree | 3f02bdf65307a3b2d832d97c585fb7ad14a05808 /coverage | |
parent | 4c26334ff5b0f1098956de3e9b5c4fb71074db90 (diff) | |
download | python-coveragepy-0d605622213a0f4405ddc9b15dadbfb7af676c82.tar.gz |
Two calls with no error checking replaced by a more convenient Py_BuildValue
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/tracer.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/coverage/tracer.c b/coverage/tracer.c index 7bc07ea..97dd113 100644 --- a/coverage/tracer.c +++ b/coverage/tracer.c @@ -235,10 +235,8 @@ CTracer_record_pair(CTracer *self, int l1, int l2) { int ret = RET_OK; - PyObject * t = PyTuple_New(2); + PyObject * t = Py_BuildValue("(ii)", l1, l2); if (t != NULL) { - PyTuple_SET_ITEM(t, 0, MyInt_FromLong(l1)); - PyTuple_SET_ITEM(t, 1, MyInt_FromLong(l2)); if (PyDict_SetItem(self->cur_file_data, t, Py_None) < 0) { STATS( self->stats.errors++; ) ret = RET_ERROR; |