summaryrefslogtreecommitdiff
path: root/source4/libnet
diff options
context:
space:
mode:
Diffstat (limited to 'source4/libnet')
-rw-r--r--source4/libnet/py_net.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c
index 0b1eb7b916..79abcd27ed 100644
--- a/source4/libnet/py_net.c
+++ b/source4/libnet/py_net.c
@@ -407,10 +407,12 @@ static PyObject *py_net_replicate_chunk(py_net_Object *self, PyObject *args, PyO
switch (level) {
case 1:
+#ifdef Py_TYPE
if (strcmp("drsuapi.DsGetNCChangesCtr1", Py_TYPE(py_ctr)->tp_name) != 0) {
PyErr_SetString(PyExc_TypeError, "Expected DsGetNCChangesCtr1 type for ctr");
return NULL;
}
+#endif
s->chunk.ctr1 = py_talloc_get_ptr(py_ctr);
s->partition.nc = *s->chunk.ctr1->naming_context;
s->partition.more_data = s->chunk.ctr1->more_data;
@@ -419,10 +421,12 @@ static PyObject *py_net_replicate_chunk(py_net_Object *self, PyObject *args, PyO
s->partition.highwatermark = s->chunk.ctr1->new_highwatermark;
break;
case 6:
+#ifdef Py_TYPE
if (strcmp("drsuapi.DsGetNCChangesCtr6", Py_TYPE(py_ctr)->tp_name) != 0) {
PyErr_SetString(PyExc_TypeError, "Expected DsGetNCChangesCtr6 type for ctr");
return NULL;
}
+#endif
s->chunk.ctr6 = py_talloc_get_ptr(py_ctr);
s->partition.nc = *s->chunk.ctr6->naming_context;
s->partition.more_data = s->chunk.ctr6->more_data;