diff options
author | Stefan Metzmacher <metze@samba.org> | 2017-02-22 10:14:10 +0100 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2017-02-25 02:39:11 +0100 |
commit | 8b2b721208dd0b05595d50851f0e13486e0b915f (patch) | |
tree | 6d364f3370221ebc50ee8484c046304a83f87d18 | |
parent | 20057544cb9be5a18141476739744d1f1af7cde9 (diff) | |
download | samba-8b2b721208dd0b05595d50851f0e13486e0b915f.tar.gz |
py_net: make use of pytalloc_GenericObject_steal()
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12601
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rw-r--r-- | source4/libnet/py_net.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source4/libnet/py_net.c b/source4/libnet/py_net.c index 3e70c79ea74..5180c247a71 100644 --- a/source4/libnet/py_net.c +++ b/source4/libnet/py_net.c @@ -457,7 +457,7 @@ static PyObject *py_net_replicate_init(py_net_Object *self, PyObject *args, PyOb s->chunk.forest = &s->forest; s->chunk.dest_dsa = &s->dest_dsa; - return pytalloc_CObject_FromTallocPtr(s); + return pytalloc_GenericObject_steal(s); } @@ -485,9 +485,8 @@ static PyObject *py_net_replicate_chunk(py_net_Object *self, PyObject *args, PyO return NULL; } - s = talloc_get_type(PyCObject_AsVoidPtr(py_state), struct replicate_state); + s = pytalloc_get_type(py_state, struct replicate_state); if (!s) { - PyErr_SetString(PyExc_TypeError, "Expected replication_state"); return NULL; } |