-
Notifications
You must be signed in to change notification settings - Fork 131
Implement BUILD_LIST_UNPACK #141
Conversation
Tests/test_emission.cpp
Outdated
| REQUIRE(!PyErr_Occurred()); | ||
|
|
||
| auto repr = PyUnicode_AsUTF8(PyObject_Repr(res)); | ||
| Py_DECREF(res); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you need to constructor the std::string before doing the dec ref here, I think the lifetime of the PyUnicode_AsUTF8 is only guaranteed to be valid as long as the object is
|
Otherwise LGTM |
|
I have fixed the refcount issues, but I have discovered that the |
|
Turns out the test failure is only when you run all tests; if you run the |
|
PTAL |
Part of #106
If this is accepted then an issue should be opened up about leaking locals (which is only an issue in a OOM situation).