From: Douglas Bagnall Date: Thu, 15 Feb 2024 04:07:34 +0000 (+0000) Subject: ldb:pyldb exposes Result type X-Git-Tag: tdb-1.4.11~1633 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bbd9249a9c2eb574289ccc7a940646acb2035aaa;p=thirdparty%2Fsamba.git ldb:pyldb exposes Result type You perhaps never want to manually create results (as in `x = Result()`) -- except maybe in tests -- and that would be why we never added it in the first place (or rather, we never noticed that it ws missing). But we do want to sometimes go `isinstance(x, ldb.Result)`, and that is how we noticed it was missing now. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/lib/ldb/pyldb.c b/lib/ldb/pyldb.c index 23637a6b2a2..20b3c26f958 100644 --- a/lib/ldb/pyldb.c +++ b/lib/ldb/pyldb.c @@ -5019,6 +5019,7 @@ static PyObject* module_init(void) PyModule_AddObject(m, "MessageElement", (PyObject *)&PyLdbMessageElement); PyModule_AddObject(m, "Module", (PyObject *)&PyLdbModule); PyModule_AddObject(m, "Tree", (PyObject *)&PyLdbTree); + PyModule_AddObject(m, "Result", (PyObject *)&PyLdbResult); PyModule_AddObject(m, "Control", (PyObject *)&PyLdbControl); PyModule_AddStringConstant(m, "__version__", PACKAGE_VERSION);