mirror of
https://github.com/samba-team/samba.git
synced 2025-02-28 01:58:17 +03:00
pyldb: py_ldb_msg_keys() uses PyErr_LDB_MESSAGE_OR_RAISE
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>
This commit is contained in:
parent
d05ae6872b
commit
acba42b126
@ -3711,12 +3711,16 @@ static PyObject *py_ldb_msg_remove_attr(PyObject *self, PyObject *args)
|
||||
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;
|
||||
}
|
||||
@ -3983,7 +3987,7 @@ static PyMethodDef py_ldb_msg_methods[] = {
|
||||
{0},
|
||||
};
|
||||
|
||||
static PyObject *py_ldb_msg_iter(PyLdbMessageObject *self)
|
||||
static PyObject *py_ldb_msg_iter(PyObject *self)
|
||||
{
|
||||
PyObject *list, *iter;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user