diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-08-25 23:04:11 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-08-25 23:05:05 +1000 |
commit | aa54d239e2abee69f68be554e018fa578f4178af (patch) | |
tree | e50cb80be4c437c820c449c4a3e059983317c44e | |
parent | e69b13ccdd008c792f8856a121b188cb11a9afa8 (diff) | |
download | samba-aa54d239e2abee69f68be554e018fa578f4178af.tar.gz samba-aa54d239e2abee69f68be554e018fa578f4178af.tar.bz2 samba-aa54d239e2abee69f68be554e018fa578f4178af.zip |
s4-pynet: some systems don't have Py_TYPE()
we need a better method than this ....
-rw-r--r-- | source4/libnet/py_net.c | 4 |
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; |