We change the [unused, because it always cast] signature of
py_ldb_msg_iter() in the same commit, because that is just a wrapper
around _keys() and this maintains bisectability with the least fuss.
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Py_RETURN_NONE;
}
-static PyObject *py_ldb_msg_keys(PyLdbMessageObject *self,
+static PyObject *py_ldb_msg_keys(PyObject *self,
PyObject *Py_UNUSED(ignored))
{
- struct ldb_message *msg = pyldb_Message_AsMessage(self);
+ struct ldb_message *msg = NULL;
Py_ssize_t i, j = 0;
- PyObject *obj = PyList_New(msg->num_elements+(msg->dn != NULL?1:0));
+ PyObject *obj = NULL;
+
+ PyErr_LDB_MESSAGE_OR_RAISE(self, msg);
+
+ obj = PyList_New(msg->num_elements+(msg->dn != NULL?1:0));
if (obj == NULL) {
return NULL;
}
{0},
};
-static PyObject *py_ldb_msg_iter(PyLdbMessageObject *self)
+static PyObject *py_ldb_msg_iter(PyObject *self)
{
PyObject *list, *iter;