just like:<br><br>env.key = value<br><br><div class="gmail_quote">On Thu, May 29, 2008 at 9:26 AM, Yingbo Qiu <<a href="mailto:qiuyingbo@gmail.com">qiuyingbo@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
BTW: I think pybsddb's DBEnv object should supply a method to assign<br>
some private item value.<br>
<br>
I have to use global variable to pass it into event_callback function.<br>
<br>
for example: db-4.7.25/examples_c/ex_rep/mgr/rep_mgr.c<br>
<br>
static void<br>
event_callback(dbenv, which, info)<br>
DB_ENV *dbenv;<br>
u_int32_t which;<br>
void *info;<br>
{<br>
APP_DATA *app = dbenv->app_private;<br>
SHARED_DATA *shared = &app->shared_data;<br>
<br>
info = NULL; /* Currently unused. */<br>
<br>
switch (which) {<br>
case DB_EVENT_REP_CLIENT:<br>
shared->is_master = 0;<br>
break;<br>
<br>
case DB_EVENT_REP_MASTER:<br>
shared->is_master = 1;<br>
break;<br>
....<br>
<br>
With pybsddb, programmer just set "shared" to a global variable. :(<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
pybsddb mailing list<br>
<a href="mailto:pybsddb@argo.es">pybsddb@argo.es</a><br>
<a href="http://mailman.argo.es/listinfo/pybsddb" target="_blank">http://mailman.argo.es/listinfo/pybsddb</a><br>
<a href="http://www.argo.es/%7Ejcea/programacion/pybsddb.htm" target="_blank">http://www.argo.es/~jcea/programacion/pybsddb.htm</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br><br>Davies Liu