From f8fcd21812d307d63639755221662568203e6e53 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 5 Dec 2023 11:59:46 +1300 Subject: [PATCH] pyldb: Remove last caller to and definition of PyLdb_Check() This is now checked by PyArg_ParseTupleAndKeywords(). Signed-off-by: Andrew Bartlett Reviewed-by: Douglas Bagnall --- lib/ldb/pyldb.c | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 51a5a689f19..0c81c1ba318 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -70,7 +70,6 @@ static PyTypeObject PyLdbModule; static PyTypeObject PyLdbDn; #define pyldb_Dn_Check(ob) PyObject_TypeCheck(ob, &PyLdbDn) static PyTypeObject PyLdb; -#define PyLdb_Check(ob) PyObject_TypeCheck(ob, &PyLdb) static PyTypeObject PyLdbMessageElement; #define pyldb_MessageElement_Check(ob) PyObject_TypeCheck(ob, &PyLdbMessageElement) @@ -3758,11 +3757,6 @@ static PyObject *py_ldb_msg_from_dict(PyTypeObject *type, PyObject *args) return NULL; } - if (!PyLdb_Check(py_ldb)) { - PyErr_SetString(PyExc_TypeError, "Expected Ldb"); - return NULL; - } - /* mask only flags we are going to use */ mod_flags = LDB_FLAG_MOD_TYPE(mod_flags); if (!mod_flags) { -- 2.34.1