tdb merges (was svn commit r17607)
jra at samba.org
Wed Aug 23 22:37:37 GMT 2006
On Thu, Aug 24, 2006 at 07:23:55AM +1000, tridge at samba.org wrote:
> > Looks fine to me also.
> just checking, I presuming you're acking the merge of what we do in
> Samba4 now (ie. a small change?).
Actually I was acking the new api :-).
> I also offered an alternative proposal where I attempted to "future
> proof" the API so we don't need to go through this again.
> hmm, actually, maybe we can keep the current API and still future
> proof it? What do you think of the following:
> struct tdb_context *tdb;
> int ret;
> tdb = tdb_init(mem_ctx);
> tdb_set_logging_fn(tdb, log_fn);
> tdb_set_logging_fn_private(tdb, log_private);
> tdb_set_hash_size(tdb, hash_size);
> tdb_set_hash_func(tdb, hash_fn);
> ret = tdb_attach(tdb, name, tdb_flags, open_flags, mode);
> note that we could then build the existing tdb_open() and
> tdb_open_ex() as simple wrappers around the above, so existing code
> (and even binaries) would work, but we can also add new features
> without disturbing the API.
> We can have our cake and eat it too :-)
Yum ! :-).
I'm happy with this, I do like the new API better.
More information about the samba-technical