37 char * db_name = va_arg(* params,
void *);
39 this->db_name =
memMalloc(strlen(db_name) + 1);
40 strcpy(this->db_name, db_name);
42 this->gdbm = gdbm_open(
45 GDBM_WRCREAT|GDBM_NOLOCK,
46 S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH,
49 if (NULL == this->gdbm) {
62 if (NULL != this->db_name)
MEM_FREE(this->db_name);
63 if (NULL != this->gdbm) {
64 gdbm_close(this->gdbm);
CREATE_CLASS(Storage, NULL, IFACE(Class))
INIT_IFACE(Class, storageCtor, storageDtor, NULL)
static int storageCtor(void *_this, va_list *params)
static void storageDtor(void *_this)