diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2010-12-30 03:43:23 +0100 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2011-01-03 01:48:04 +0100 |
commit | b63f9c199659fafa2525ef24525b22e339f97f93 (patch) | |
tree | 4b6edd0f0ab46842c41dd2e84e294acc18b5f64a | |
parent | cbf504b0c5e08ccf9776f079ef2d4a0c2258241b (diff) | |
download | samba-b63f9c199659fafa2525ef24525b22e339f97f93.tar.gz samba-b63f9c199659fafa2525ef24525b22e339f97f93.tar.bz2 samba-b63f9c199659fafa2525ef24525b22e339f97f93.zip |
ldb: Remove duplicate definition of check_special, use PyObject_New.
-rw-r--r-- | source4/lib/ldb/pyldb.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index d829c42ce6..62162067ac 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -269,8 +269,6 @@ static PyMethodDef py_ldb_dn_methods[] = { { "canonical_ex_str", (PyCFunction)py_ldb_dn_canonical_ex_str, METH_NOARGS, "S.canonical_ex_str() -> string\n" "Canonical version of this DN (like a posix path, with terminating newline)." }, - { "check_special", (PyCFunction)py_ldb_dn_is_special, METH_VARARGS, - NULL }, { "parent", (PyCFunction)py_ldb_dn_get_parent, METH_NOARGS, "S.parent() -> dn\n" "Get the parent for this DN." }, @@ -281,7 +279,8 @@ static PyMethodDef py_ldb_dn_methods[] = { "S.add_base(dn) -> None\n" "Add a base DN to this DN." }, { "check_special", (PyCFunction)py_ldb_dn_check_special, METH_VARARGS, - NULL }, + "S.check_special(name) -> bool\n\n" + "Check if name is a special DN name"}, { NULL } }; @@ -1866,7 +1865,7 @@ static PyObject *py_ldb_msg_element_iter(PyLdbMessageElementObject *self) PyObject *PyLdbMessageElement_FromMessageElement(struct ldb_message_element *el, TALLOC_CTX *mem_ctx) { PyLdbMessageElementObject *ret; - ret = (PyLdbMessageElementObject *)PyLdbMessageElement.tp_alloc(&PyLdbMessageElement, 0); + ret = PyObject_New(PyLdbMessageElementObject, &PyLdbMessageElement); if (ret == NULL) { PyErr_NoMemory(); return NULL; @@ -1937,7 +1936,7 @@ static PyObject *py_ldb_msg_element_new(PyTypeObject *type, PyObject *args, PyOb el->flags = flags; el->name = talloc_strdup(el, name); - ret = (PyLdbMessageElementObject *)PyLdbMessageElement.tp_alloc(&PyLdbMessageElement, 0); + ret = PyObject_New(PyLdbMessageElementObject, &PyLdbMessageElement); if (ret == NULL) { PyErr_NoMemory(); talloc_free(mem_ctx); |