diff options
author | Andrew Bartlett <abartlet@samba.org> | 2009-11-26 15:32:06 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-11-27 16:05:04 +1100 |
commit | 2fd831407d81a53f79fd4d207d086ee9882e7606 (patch) | |
tree | 8c925f2878b6ca1e75f40e3963fcc14714102242 /source4/lib | |
parent | 09338e60bc0003abefd31902de721ecf8fee1552 (diff) | |
download | samba-2fd831407d81a53f79fd4d207d086ee9882e7606.tar.gz samba-2fd831407d81a53f79fd4d207d086ee9882e7606.tar.bz2 samba-2fd831407d81a53f79fd4d207d086ee9882e7606.zip |
s4:ldb Provide bindings for ldb_transaction_prepare_commit()
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/pyldb.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source4/lib/ldb/pyldb.c b/source4/lib/ldb/pyldb.c index 0d1d2fa966..0ba69e1c48 100644 --- a/source4/lib/ldb/pyldb.c +++ b/source4/lib/ldb/pyldb.c @@ -477,6 +477,12 @@ static PyObject *py_ldb_transaction_commit(PyLdbObject *self) Py_RETURN_NONE; } +static PyObject *py_ldb_transaction_prepare_commit(PyLdbObject *self) +{ + PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_prepare_commit(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self)); + Py_RETURN_NONE; +} + static PyObject *py_ldb_transaction_cancel(PyLdbObject *self) { PyErr_LDB_ERROR_IS_ERR_RAISE(PyExc_LdbError, ldb_transaction_cancel(PyLdb_AsLdbContext(self)), PyLdb_AsLdbContext(self)); @@ -1224,6 +1230,9 @@ static PyMethodDef py_ldb_methods[] = { { "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, "S.transaction_commit() -> None\n" "commit a new transaction." }, |