]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:pyldb exposes Result type
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Thu, 15 Feb 2024 04:07:34 +0000 (04:07 +0000)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 1 Mar 2024 00:19:45 +0000 (00:19 +0000)
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 <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
lib/ldb/pyldb.c

index 23637a6b2a20ddfd85876f6ccee2b79d1172fc07..20b3c26f958e29e59615b59f086c90e5a3cae186 100644 (file)
@@ -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);