8 #ifndef CNFIXEDSTRING_H
9 #define CNFIXEDSTRING_H
66 static inline const unsigned char *
77 static inline uint64_t
struct CNFixedString * CNSearchFixedStringById(uint64_t src)
Search fixed-string in pool by the id.
Information to present memory profile.
Definition: CNMemoryProfile.h:16
Persistent string. There are only one object for each context of string.
Definition: CNFixedString.h:21
struct CNFixedString * CNSearchFixedStringByUTF8String(size_t srclen, const unsigned char *srcstr)
Search fixed-string in pool by the string.
struct CNMemoryProfile CNProfileOfFixedStringPool(void)
Get memory usage information.
uint64_t uniqId
Definition: CNFixedString.h:25
static size_t CNLengthOfFixedString(const struct CNFixedString *src)
Get length of CNFixedString.
Definition: CNFixedString.h:56
Define CNMemoryProfile data structure.
static const unsigned char * CNContentOfFixedString(const struct CNFixedString *src)
Get content of CNFixedString.
Definition: CNFixedString.h:67
void CNSetupFixedStringPool(void)
Initialize pool for CNFixedString.
CNBoolean CNForeachFixedStringInFixedStringPool(CNVisitFixedStringPoolFuncRef visitfunc, void *userdata)
Get all fixed string in fixed string pool.
void CNPrintFixedString(FILE *outfp, const struct CNFixedString *src)
Print fixed-string.
struct CNFixedString * CNAllocateFixedString(size_t len, const unsigned char *str)
Allocate CNFixedString object.
const unsigned char * content
Definition: CNFixedString.h:27
Define primitive data types.
CNBoolean(* CNVisitFixedStringPoolFuncRef)(const struct CNFixedString *str, void *userdata)
Definition: CNFixedString.h:31
static CNBoolean CNIsSameFixedString(const struct CNFixedString *s0, const struct CNFixedString *s1)
Check 2 string has same context or not.
Definition: CNFixedString.h:91
size_t length
Definition: CNFixedString.h:23
unsigned int CNBoolean
Boolean type.
Definition: CNType.h:14
static uint64_t CNUniqueIdOfFixedString(const struct CNFixedString *src)
Get hash value of CNFixedString.
Definition: CNFixedString.h:78