From: Michal Vaner Date: Thu, 23 Oct 2008 08:15:00 +0000 (+0200) Subject: ucw docs: cf_pool X-Git-Tag: holmes-import~248 X-Git-Url: http://mj.ucw.cz/gitweb/?a=commitdiff_plain;h=3e70a47cd71b59f2fc70afbb4f3e8bf7bb02a427;p=libucw.git ucw docs: cf_pool --- diff --git a/ucw/conf.h b/ucw/conf.h index 53547dae..1224f591 100644 --- a/ucw/conf.h +++ b/ucw/conf.h @@ -310,8 +310,14 @@ struct cf_section { /** A section. **/ * You should use these routines when implementing custom parsers. ***/ struct mempool; -extern struct mempool *cf_pool; /** A <> for configuration parser needs. **/ -void *cf_malloc(uns size); /** Returns @size bytes of memory. **/ +/** + * A <> for configuration parser needs. + * Memory allocated from here is valid as long as the current config is loaded + * (if you allocate some memory and rollback the transaction or you load some + * other configuration, it gets lost). + **/ +extern struct mempool *cf_pool; +void *cf_malloc(uns size); /** Returns @size bytes of memory. Allocates from <>. **/ void *cf_malloc_zero(uns size); /** Like @cf_malloc(), but zeroes the memory. **/ char *cf_strdup(const char *s); /** Copy a string into @cf_malloc()ed memory. **/ char *cf_printf(const char *fmt, ...) FORMAT_CHECK(printf,1,2); /** printf() into @cf_malloc()ed memory. **/