33 #ifndef QOF_STRING_UTIL_H 34 #define QOF_STRING_UTIL_H 41 #define QOF_MOD_UTIL "qof.utilities" 93 #define CACHE_INSERT(str) qof_string_cache_insert((str)) 94 #define CACHE_REMOVE(str) qof_string_cache_remove((str)) 103 #define CACHE_REPLACE(dst, src) do { \ 104 const char *tmp = CACHE_INSERT((src)); \ 105 CACHE_REMOVE((dst)); \ 109 #define QOF_CACHE_NEW(void) qof_string_cache_insert("") const char * qof_string_cache_replace(const char *dst, const char *src)
Same as CACHE_REPLACE below, but safe to call from C++.
void qof_string_cache_destroy(void)
Destroy the qof_string_cache.
const char * qof_string_cache_insert(const char *key)
You can use this function with g_hash_table_insert(), for the key (or value), as long as you use the ...
void qof_string_cache_remove(const char *key)
You can use this function as a destroy notifier for a GHashTable that uses common strings as keys (or...
void qof_string_cache_init(void)
The QOF String Cache: