On 2014-01-05 20:03, hyc@symas.com wrote:
I made this comment to Hallvard as well. It should be:
MDB_assert_func * mdb_env_set_assert(MDB_env *env, MDB_assert_func *func, void *info);
Yes, I missed that. Hadn't intended to take this ITS into such a detour.
Maybe such a context argument can be useful outside asserts too though, like a Python wrapper which wants the Python element wrapping the MDB_env of a given txn.
If so, instead of passing the context to mdb_env_set_assert(): int mdb_env_set_userctx(env, void *ctx); void *mdb_env_get_userctx(env); assert() could still pass it out to the assert fallback.