License along with this library; if not, see <http://www.gnu.org/licenses/>.
*/
-#include <Python.h>
+#include "lib/replace/system/python.h"
#include "replace.h"
#include <tevent.h>
if (self->timer) {
talloc_free(self->timer);
}
- Py_DECREF(self->callback);
+ Py_CLEAR(self->callback);
PyObject_Del(self);
}
static int TeventTimer_Object_ref_destructor(struct TeventTimer_Object_ref *ref)
{
ref->obj->timer = NULL;
- Py_DECREF(ref->obj);
+ Py_CLEAR(ref->obj);
return 0;
}