• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

llnl / dftracer-utils / 28423703495

30 Jun 2026 05:59AM UTC coverage: 51.998% (-0.3%) from 52.278%
28423703495

Pull #83

github

web-flow
Merge fb542a938 into 2efed6649
Pull Request #83: refactor and improve code QoL

37282 of 93303 branches covered (39.96%)

Branch coverage included in aggregate %.

801 of 1525 new or added lines in 78 files covered. (52.52%)

98 existing lines in 37 files now uncovered.

33674 of 43157 relevant lines covered (78.03%)

20306.85 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

90.91
/src/dftracer/utils/python/py_type_helpers.h
1
#ifndef DFTRACER_UTILS_PYTHON_PY_TYPE_HELPERS_H
2
#define DFTRACER_UTILS_PYTHON_PY_TYPE_HELPERS_H
3

4
#include <Python.h>
5

6
// Ready a type and add it to the module under `name`. Returns 0 on success,
7
// -1 on failure with the Python error set.
8
//
9
// Note: this deliberately does NOT decref the module on failure. PyInit_*
10
// returns NULL without owning a balancing reference to the module, so an extra
11
// Py_DECREF(m) here would be an over-release bug.
12
inline int register_type(PyObject *m, PyTypeObject *type, const char *name) {
42✔
13
    if (PyType_Ready(type) < 0) return -1;
42✔
14
    Py_INCREF(type);
21✔
15
    if (PyModule_AddObject(m, name, reinterpret_cast<PyObject *>(type)) < 0) {
42✔
16
        Py_DECREF(type);
NEW
17
        return -1;
×
18
    }
19
    return 0;
42✔
20
}
21✔
21

22
#endif  // DFTRACER_UTILS_PYTHON_PY_TYPE_HELPERS_H
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc