obj_free and odes->local_pool are gone.
struct odes { /* Object description */
struct oattr *attrs;
- struct mempool *pool, *local_pool;
+ struct mempool *pool;
struct oattr *cached_attr;
};
void obj_dump(struct odes *);
struct odes *obj_new(struct mempool *);
-void obj_free(struct odes *);
int obj_read(struct fastbuf *, struct odes *);
void obj_write(struct fastbuf *, struct odes *);
struct oattr *obj_find_attr(struct odes *, uns);
struct odes *
obj_new(struct mempool *pool)
{
- struct mempool *lp = pool;
struct odes *o;
- if (!lp)
- lp = mp_new(OBJ_POOL_SIZE);
o = mp_alloc(lp, sizeof(struct odes));
- o->pool = lp;
- o->local_pool = (pool == lp) ? NULL : lp;
+ o->pool = pool;
o->attrs = NULL;
o->cached_attr = NULL;
return o;
}
-void
-obj_free(struct odes *o)
-{
- if (o->local_pool)
- mp_delete(o->local_pool);
-}
-
int
obj_read(struct fastbuf *f, struct odes *o)
{