summaryrefslogtreecommitdiff
path: root/src/multi.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/multi.c')
-rw-r--r--src/multi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/multi.c b/src/multi.c
index d7677c5..850eabb 100644
--- a/src/multi.c
+++ b/src/multi.c
@@ -11,7 +11,7 @@ static void
assert_multi_state(const CurlMultiObject *self)
{
assert(self != NULL);
- assert(Py_TYPE(self) == p_CurlMulti_Type);
+ assert(PyObject_IsInstance((PyObject *) self, (PyObject *) p_CurlMulti_Type) == 1);
#ifdef WITH_THREAD
if (self->state != NULL) {
assert(self->multi_handle != NULL);
@@ -56,7 +56,7 @@ do_multi_new(PyTypeObject *subtype, PyObject *args, PyObject *kwds)
}
/* Allocate python curl-multi object */
- self = (CurlMultiObject *) p_CurlMulti_Type->tp_alloc(p_CurlMulti_Type, 0);
+ self = (CurlMultiObject *) subtype->tp_alloc(subtype, 0);
if (!self) {
return NULL;
}