|
libusual
0.1
|
Storage for shared strings. More...
Data Structures | |
| struct | PStr |
| Pooled String. More... | |
Functions | |
| struct StrPool * | strpool_create (CxMem *ca) |
| Create new pool. | |
| void | strpool_free (struct StrPool *sp) |
| Release pool. | |
| struct PStr * | strpool_get (struct StrPool *sp, const char *str, ssize_t len) |
| Return either existing or new PStr for given value. | |
| void | strpool_incref (struct PStr *str) |
| Increase reference count for existing PStr. | |
| void | strpool_decref (struct PStr *str) |
| Decrease reference count for existing PStr. | |
| int | strpool_total (struct StrPool *sp) |
| Return count of strings in the pool. | |
Storage for shared strings.
This provides refcounted searchable string pool for cases where lot of objects reference same strings.
| struct StrPool* strpool_create | ( | CxMem * | ca | ) | [read] |
Create new pool.
| void strpool_free | ( | struct StrPool * | sp | ) |
Release pool.
| struct PStr* strpool_get | ( | struct StrPool * | sp, |
| const char * | str, | ||
| ssize_t | len | ||
| ) | [read] |
Return either existing or new PStr for given value.
| void strpool_incref | ( | struct PStr * | str | ) |
Increase reference count for existing PStr.
| void strpool_decref | ( | struct PStr * | str | ) |
Decrease reference count for existing PStr.
| int strpool_total | ( | struct StrPool * | sp | ) |
Return count of strings in the pool.
1.7.6.1