{
return PyBool_FromLong(ldb_dn_is_null(self->dn));
}
-
+
static PyObject *py_ldb_dn_get_casefold(PyLdbDnObject *self,
PyObject *Py_UNUSED(ignored))
{
}
static PyMethodDef py_ldb_dn_methods[] = {
- { "validate", (PyCFunction)py_ldb_dn_validate, METH_NOARGS,
+ { "validate", (PyCFunction)py_ldb_dn_validate, METH_NOARGS,
"S.validate() -> bool\n"
"Validate DN is correct." },
{ "is_valid", (PyCFunction)py_ldb_dn_is_valid, METH_NOARGS,
{ "parent", (PyCFunction)py_ldb_dn_get_parent, METH_NOARGS,
"S.parent() -> dn\n"
"Get the parent for this DN." },
- { "add_child", (PyCFunction)py_ldb_dn_add_child, METH_VARARGS,
+ { "add_child", (PyCFunction)py_ldb_dn_add_child, METH_VARARGS,
"S.add_child(dn) -> bool\n"
"Add a child DN to this DN." },
{ "add_base", (PyCFunction)py_ldb_dn_add_base, METH_VARARGS,
static PyMethodDef py_ldb_methods[] = {
- { "set_debug", (PyCFunction)py_ldb_set_debug, METH_VARARGS,
+ { "set_debug", (PyCFunction)py_ldb_set_debug, METH_VARARGS,
"S.set_debug(callback) -> None\n"
"Set callback for LDB debug messages.\n"
"The callback should accept a debug level and debug text." },
- { "set_create_perms", (PyCFunction)py_ldb_set_create_perms, METH_VARARGS,
+ { "set_create_perms", (PyCFunction)py_ldb_set_create_perms, METH_VARARGS,
"S.set_create_perms(mode) -> None\n"
"Set mode to use when creating new LDB files." },
{ "set_modules_dir", (PyCFunction)py_ldb_set_modules_dir, METH_VARARGS,
"S.set_modules_dir(path) -> None\n"
"Set path LDB should search for modules" },
- { "transaction_start", (PyCFunction)py_ldb_transaction_start, METH_NOARGS,
+ { "transaction_start", (PyCFunction)py_ldb_transaction_start, METH_NOARGS,
"S.transaction_start() -> None\n"
"Start a new transaction." },
{ "transaction_prepare_commit", (PyCFunction)py_ldb_transaction_prepare_commit, METH_NOARGS,
"S.transaction_prepare_commit() -> None\n"
"prepare to commit a new transaction (2-stage commit)." },
- { "transaction_commit", (PyCFunction)py_ldb_transaction_commit, METH_NOARGS,
+ { "transaction_commit", (PyCFunction)py_ldb_transaction_commit, METH_NOARGS,
"S.transaction_commit() -> None\n"
"commit a new transaction." },
- { "transaction_cancel", (PyCFunction)py_ldb_transaction_cancel, METH_NOARGS,
+ { "transaction_cancel", (PyCFunction)py_ldb_transaction_cancel, METH_NOARGS,
"S.transaction_cancel() -> None\n"
"cancel a new transaction." },
- { "setup_wellknown_attributes", (PyCFunction)py_ldb_setup_wellknown_attributes, METH_NOARGS,
+ { "setup_wellknown_attributes", (PyCFunction)py_ldb_setup_wellknown_attributes, METH_NOARGS,
NULL },
{ "get_root_basedn", (PyCFunction)py_ldb_get_root_basedn, METH_NOARGS,
NULL },
/**
* Create a ldb_message_element from a Python object.
*
- * This will accept any sequence objects that contains strings, or
+ * This will accept any sequence objects that contains strings, or
* a string object.
*
* A reference to set_obj might be borrowed.
talloc_free(mem_ctx);
return NULL;
}
- el->values[0].data = talloc_memdup(el->values,
+ el->values[0].data = talloc_memdup(el->values,
(const uint8_t *)msg, size + 1);
el->values[0].length = size;
} else if (PySequence_Check(py_elements)) {
msg = PyUnicode_AsUTF8AndSize(item, &size);
result = (msg == NULL) ? -1 : 0;
} else {
- PyErr_Format(PyExc_TypeError,
+ PyErr_Format(PyExc_TypeError,
"Expected string as element %zd in list", i);
result = -1;
}
el->values[i].length = size;
}
} else {
- PyErr_SetString(PyExc_TypeError,
+ PyErr_SetString(PyExc_TypeError,
"Expected string or list");
talloc_free(mem_ctx);
return NULL;
{ "keys", (PyCFunction)py_ldb_msg_keys, METH_NOARGS,
"S.keys() -> list\n\n"
"Return sequence of all attribute names." },
- { "remove", (PyCFunction)py_ldb_msg_remove_attr, METH_VARARGS,
+ { "remove", (PyCFunction)py_ldb_msg_remove_attr, METH_VARARGS,
"S.remove(name)\n\n"
"Remove all entries for attributes with the specified name."},
{ "get", PY_DISCARD_FUNC_SIG(PyCFunction, py_ldb_msg_get),
}
static PyMethodDef py_ldb_global_methods[] = {
- { "timestring", py_timestring, METH_VARARGS,
+ { "timestring", py_timestring, METH_VARARGS,
"S.timestring(int) -> string\n\n"
"Generate a LDAP time string from a UNIX timestamp" },
{ "string_to_time", py_string_to_time, METH_VARARGS,