Branch: Tag:

2003-05-25

2003-05-25 02:58:40 by Martin Nilsson <mani@lysator.liu.se>

Fixed some details found by tcc

Rev: src/modules/Gdbm/gdbmmod.c:1.25
Rev: src/modules/Gettext/gettext.c:1.16

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: gdbmmod.c,v 1.24 2003/04/07 17:25:04 nilsson Exp $ + || $Id: gdbmmod.c,v 1.25 2003/05/25 02:58:06 nilsson Exp $   */      #include "global.h" - RCSID("$Id: gdbmmod.c,v 1.24 2003/04/07 17:25:04 nilsson Exp $"); + RCSID("$Id: gdbmmod.c,v 1.25 2003/05/25 02:58:06 nilsson Exp $");   #include "gdbm_machine.h"   #include "threads.h"   
168:    if(tmp) gdbm_close(tmp);    Pike_error("Object destructed in gdbm->open()n");    } -  THIS->dbf=tmp; +  this->dbf=tmp;       pop_n_elems(args); -  if(!THIS->dbf) +  if(!this->dbf)    Pike_error("Failed to open GDBM database.\n");    }   }
218:    }   }    - /*! @decl int delete(string key) + /*! @decl int(0..1) delete(string key)    *! -  *! Remove a key from the database. Note that no error will be generated -  *! if the key does not exist. +  *! Remove a key from the database. Returns 1 if successful, +  *! otherwise 0, e.g. when the item is not present or the +  *! database is read only.    */      static void gdbmmod_delete(INT32 args)
247:    THREADS_DISALLOW();       pop_n_elems(args); -  push_int(0); +  push_int( ret==0 );   }      /*! @decl string firstkey()
480: Inside #if defined(HAVE_GDBM_H) && defined(HAVE_LIBGDBM)
   /* function(string:string) */    ADD_FUNCTION("`[]",gdbmmod_fetch,tFunc(tStr,tStr),0);    /* function(string:int) */ -  ADD_FUNCTION("delete",gdbmmod_delete,tFunc(tStr,tInt),0); +  ADD_FUNCTION("delete",gdbmmod_delete,tFunc(tStr,tInt01),0);    /* function(:string) */    ADD_FUNCTION("firstkey",gdbmmod_firstkey,tFunc(tNone,tStr),0);    /* function(string:string) */