summaryrefslogtreecommitdiffstats
path: root/Modules/_bsddb.c
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
committerGeorg Brandl <georg@python.org>2006-05-29 21:04:52 (GMT)
commit96a8c3954cbdb186bc567a490dad8987508ce268 (patch)
tree4d6516790abcd566c43418e4c9b02e9c52cf9f2f /Modules/_bsddb.c
parentfd9a4b19e9c77e9ccc3e7fcb57051cf160c0df6d (diff)
downloadcpython-96a8c3954cbdb186bc567a490dad8987508ce268.zip
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.gz
cpython-96a8c3954cbdb186bc567a490dad8987508ce268.tar.bz2
Make use of METH_O and METH_NOARGS where possible.
Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
Diffstat (limited to 'Modules/_bsddb.c')
-rw-r--r--Modules/_bsddb.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/Modules/_bsddb.c b/Modules/_bsddb.c
index 7772046..c8edaa0 100644
--- a/Modules/_bsddb.c
+++ b/Modules/_bsddb.c
@@ -1041,7 +1041,7 @@ DB_append(DBObject* self, PyObject* args)
DBT key, data;
DB_TXN *txn = NULL;
- if (!PyArg_ParseTuple(args, "O|O:append", &dataobj, &txnobj))
+ if (!PyArg_UnpackTuple(args, "append", 1, 2, &dataobj, &txnobj))
return NULL;
CHECK_DB_NOT_CLOSED(self);
@@ -2895,7 +2895,7 @@ DB_keys(DBObject* self, PyObject* args)
PyObject* txnobj = NULL;
DB_TXN *txn = NULL;
- if (!PyArg_ParseTuple(args,"|O:keys", &txnobj))
+ if (!PyArg_UnpackTuple(args, "keys", 0, 1, &txnobj))
return NULL;
if (!checkTxnObj(txnobj, &txn))
return NULL;
@@ -2909,7 +2909,7 @@ DB_items(DBObject* self, PyObject* args)
PyObject* txnobj = NULL;
DB_TXN *txn = NULL;
- if (!PyArg_ParseTuple(args,"|O:items", &txnobj))
+ if (!PyArg_UnpackTuple(args, "items", 0, 1, &txnobj))
return NULL;
if (!checkTxnObj(txnobj, &txn))
return NULL;
@@ -2923,7 +2923,7 @@ DB_values(DBObject* self, PyObject* args)
PyObject* txnobj = NULL;
DB_TXN *txn = NULL;
- if (!PyArg_ParseTuple(args,"|O:values", &txnobj))
+ if (!PyArg_UnpackTuple(args, "values", 0, 1, &txnobj))
return NULL;
if (!checkTxnObj(txnobj, &txn))
return NULL;