[PATCH 04/14] pytdb: Introduce PyTdb_ARGS_AS_TDBDATA helper
jelmer at samba.org
Sat Oct 2 09:18:25 MDT 2010
On Sat, 2010-10-02 at 17:43 +0400, Kirill Smelkov wrote:
> To parse `PyObject *args` into one TDBDATA.
> This already reduces boilerplate code, but will help more in the next
> patch, where there will be several fuctions (chainlock_*) which takes
> key as the only argument.
If it's really all that useful to save those few lines of code, please
simply specify that those methods receive only a single object (METH_O
IIRC) to avoid the PyArg_ParseTuple call.
Personally I'm not a big fan of macros that have side-effects, like this
one (which returns).
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 836 bytes
Desc: This is a digitally signed message part
More information about the samba-technical