if (dbenv == NULL || rc)
goto errxit;
- dbenv->set_alloc(dbenv,rpmdb->db_malloc, rpmdb->db_realloc, rpmdb->db_free);
+ dbenv->set_alloc(dbenv, rmalloc, rrealloc, NULL);
dbenv->set_errcall(dbenv, (void *) rpmdb->db_errcall);
dbenv->set_errfile(dbenv, rpmdb->db_errfile);
dbenv->set_errpfx(dbenv, rpmdb->db_errpfx);
rc = cvtdberr(dbi, "db_create", rc, _debug);
if (rc == 0 && db != NULL) {
if (rc == 0 && !dbi->dbi_use_dbenv) {
- rc = db->set_alloc(db,
- rpmdb->db_malloc, rpmdb->db_realloc, rpmdb->db_free);
+ rc = db->set_alloc(db, rmalloc, rrealloc, NULL);
rc = cvtdberr(dbi, "db->set_alloc", rc, _debug);
}
db->db_errpfx = rpmExpand( (epfx && *epfx ? epfx : _DB_ERRPFX), NULL);
/* XXX remove environment after chrooted operations, for now... */
db->db_remove_env = (!rstreq(db->db_root, "/") ? 1 : 0);
- db->db_malloc = rmalloc;
- db->db_realloc = rrealloc;
- db->db_free = NULL; /* XXX rfree() prototype differs from free() */
db->_dbi = xcalloc(dbiTagsMax, sizeof(*db->_dbi));
db->nrefs = 0;
return rpmdbLink(db);
#endif
/* dbinfo parameters */
int dbi_pagesize; /*!< (fs blksize) */
- void * (*dbi_malloc) (size_t nbytes);
/* hash access parameters */
unsigned int dbi_h_ffactor; /*!< */
unsigned int (*dbi_h_hash_fcn) (DB *, const void *bytes,
int db_mkdirDone; /*!< Has db_home been created? */
void (*db_errcall) (const char *db_errpfx, char *buffer);
FILE * db_errfile;
- void * (*db_malloc) (size_t nbytes);
- void * (*db_realloc) (void * ptr,
- size_t nbytes);
- void (*db_free) (void * ptr);
unsigned char * db_bits; /*!< package instance bit mask. */
int db_nbits; /*!< no. of bits in mask. */
rpmdb db_next;
int db_opens;
void * db_dbenv; /*!< Berkeley DB_ENV handle. */
+ int db_ndbi; /*!< No. of tag indices. */
dbiIndex * _dbi; /*!< Tag indices. */
struct rpmop_s db_getops;