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

version» Context lines:

pike.git/src/modules/Gdbm/gdbmmod.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: gdbmmod.c,v 1.9 2000/04/18 06:53:53 jonasw Exp $"); + RCSID("$Id: gdbmmod.c,v 1.10 2000/07/07 14:02:12 grubba Exp $");   #include "gdbm_machine.h"   #include "threads.h"      /* Todo: make sure only one thread accesses the same gdbmmod */      #if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM)      #include "interpret.h"   #include "svalue.h"   #include "stralloc.h"
pike.git/src/modules/Gdbm/gdbmmod.c:23: Inside #if defined(_REENTRANT)
     #ifdef _REENTRANT   static MUTEX_T gdbm_lock STATIC_MUTEX_INIT;   #endif      struct gdbm_glue   {    GDBM_FILE dbf;   };    - #define THIS ((struct gdbm_glue *)(fp->current_storage)) + #define THIS ((struct gdbm_glue *)(Pike_fp->current_storage))      static void do_free(void)   {    if(THIS->dbf)    {    GDBM_FILE dbf;    dbf=THIS->dbf;    THIS->dbf=0;       THREADS_ALLOW();
pike.git/src/modules/Gdbm/gdbmmod.c:110:    }       tmp2=sp[-args].u.string;       THREADS_ALLOW();    mt_lock(& gdbm_lock);    tmp=gdbm_open(tmp2->str, 512, rwmode, 00666, gdbmmod_fatal);    mt_unlock(& gdbm_lock);    THREADS_DISALLOW();    -  if(!fp->current_object->prog) +  if(!Pike_fp->current_object->prog)    {    if(tmp) gdbm_close(tmp);    error("Object destructed in gdbm->open()n");    }    THIS->dbf=tmp;       pop_n_elems(args);    if(!THIS->dbf)    error("Failed to open GDBM database.\n");    }