[PATCH 10/14] pytdb: Add support for tdb_check()

Jelmer Vernooij jelmer at samba.org
Sat Oct 2 15:17:39 MDT 2010


On Sat, 2010-10-02 at 17:43 +0400, Kirill Smelkov wrote:
> From: Kirill Smelkov <kirr at mns.spb.ru>
> 
> tdb_check() is needed when one wants to verify integrity of db, and
> since tdb_check() is used in tdbtorture, let's add support for it.
> 
> NOTE: I've tried to reduce code duplication between __obj_traverse and
> obj_check, but given these two functions sizes, deduplication only makes
> things less readable and worse...
pytraverse_data doesn't appear to be necessary here - can you just pass
the PyObject * for the callback?

Also, can you make the argument to check() optional and default to
None ?

Alternatively, perhaps we can just drop the check() callback. Users can
already iterate over the TDB manually, I don't see what having the
callback there really adds.

Cheers,

Jelmer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20101002/30c346ee/attachment.pgp>


More information about the samba-technical mailing list