From: Andrew Bartlett Date: Mon, 4 Dec 2023 22:59:46 +0000 (+1300) Subject: pyldb: Remove last caller to and definition of PyLdb_Check() X-Git-Tag: tdb-1.4.11~1537 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f8fcd21812d307d63639755221662568203e6e53;p=thirdparty%2Fsamba.git 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 --- 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) {