pike.git / src / modules / Gdbm / gdbmmod.c

version» Context lines:

pike.git/src/modules/Gdbm/gdbmmod.c:811: Inside #if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM)
   ADD_FUNCTION("_get_iterator", gdbmmod_get_iterator,tFunc(tNone,tObj),0);       /* some mapping operator overloading */    ADD_FUNCTION("_m_delete",gdbmmod_m_delete,tFunc(tStr,tStr8),0);    ADD_FUNCTION("_values",gdbmmod_values,tFunc(tNone,tArr(tStr8)),0);    ADD_FUNCTION("_indices",gdbmmod_indices,tFunc(tNone,tArr(tStr8)),0);       set_init_callback(init_gdbm_glue);    set_exit_callback(exit_gdbm_glue);    db = end_program(); +  add_program_constant( "DB", db, 0 ); +  add_program_constant( "gdbm", db, 0 ); /* compat (...-7.8). */ +  free_program(db); +     start_new_program();    ADD_STORAGE(struct gdbm_glue);    ADD_FUNCTION("first", gdbmmod_iter_first,tFunc(tNone,tInt01),0);    ADD_FUNCTION("next", gdbmmod_iter_next, tFunc(tNone,tInt01),0);    ADD_FUNCTION("index", gdbmmod_iter_index,tFunc(tNone,tStr8),0);    ADD_FUNCTION("value", gdbmmod_iter_value,tFunc(tNone,tStr8),0);    ADD_FUNCTION("`!", gdbmmod_iter_no_value,tFunc(tNone,tInt01),0);    set_init_callback(init_gdbm_iterator);    set_exit_callback(exit_gdbm_iterator);    iterator = end_program();    add_program_constant( "Iterator", iterator, 0 ); -  -  add_program_constant( "DB", db, 0 ); -  add_program_constant( "gdbm", db, 0 ); /* compat (...-7.8). */ -  free_program(db); +  free_program(iterator);   #else    if(!TEST_COMPAT(7,6))    HIDE_MODULE();   #endif   }