| 133 | }; |
| 134 | |
| 135 | PyObject* |
| 136 | create_pycbc_result(PyObject* raw_result_dict) |
| 137 | { |
| 138 | PyObject* obj = PyObject_CallObject((PyObject*)&pycbc_result_type, nullptr); |
| 139 | if (obj != nullptr && raw_result_dict != nullptr) { |
| 140 | pycbc_result* res = reinterpret_cast<pycbc_result*>(obj); |
| 141 | Py_DECREF(res->raw_result); // Release empty dict from init |
| 142 | Py_INCREF(raw_result_dict); // Take ownership of provided dict |
| 143 | res->raw_result = raw_result_dict; |
| 144 | } |
| 145 | return obj; |
| 146 | } |
| 147 | |
| 148 | // ====================================================================== |
| 149 | // pycbc_streamed_result type implementation |
no outgoing calls
no test coverage detected