smbd: Remove unused [push_pull]_file_id_24
[samba.git] / lib / tevent / pytevent.c
index 1af6f16c0fbbb5f8216b96bf58cf6fc09090200c..bbe29f6c693ba2295e3b3f2ab0e65cd0357e56cf 100644 (file)
@@ -22,7 +22,7 @@
    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>
 
@@ -241,7 +241,7 @@ static void py_tevent_timer_dealloc(TeventTimer_Object *self)
        if (self->timer) {
                talloc_free(self->timer);
        }
-       Py_DECREF(self->callback);
+       Py_CLEAR(self->callback);
        PyObject_Del(self);
 }
 
@@ -282,7 +282,7 @@ struct TeventTimer_Object_ref {
 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;
 }