summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>2018-04-20 16:23:42 +1200
committerDouglas Bagnall <dbagnall@samba.org>2019-07-10 04:32:13 +0000
commite075f52a7508979b744fde463d6184405d7a3772 (patch)
tree119873180d2cc597f83804e242dbad509b333a6a /source4/dsdb
parentf5e0339a0de71dc7d07f3ba95e6573076efe9efd (diff)
downloadsamba-e075f52a7508979b744fde463d6184405d7a3772.tar.gz
pyldb: fork pyldb_Ldb_AsLdbContext macro to reflect unsafeness
In the Python/C API, conversion functions which check the types of their arguments have names like: double PyFloat_AsDouble(PyObject *pyfloat); while conversion macros that don't check have names like: PyFloat_AS_DOUBLE(pyfloat) The pyldb_Ldb_AsLdbContext() macro looks like one of the checking functions but it actually isn't. This has fooled us more than once. Here we fork the macro into two -- one which performs checks and keeps the camel case, and one with a shouty name that keeps the check-free behaviour. Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz> Reviewed-by: Gary Lockyer <gary@catalyst.net.nz>
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/pydsdb.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source4/dsdb/pydsdb.c b/source4/dsdb/pydsdb.c
index 2c7779bad89..442a2abf081 100644
--- a/source4/dsdb/pydsdb.c
+++ b/source4/dsdb/pydsdb.c
@@ -41,7 +41,7 @@
PyErr_SetString(PyExc_TypeError, "Ldb connection object required"); \
return NULL; \
} \
- ldb = pyldb_Ldb_AsLdbContext(py_ldb);
+ ldb = pyldb_Ldb_AS_LDBCONTEXT(py_ldb);
#define PyErr_LDB_DN_OR_RAISE(py_ldb_dn, dn) \
if (!py_check_dcerpc_type(py_ldb_dn, "ldb", "Dn")) { \