add FC_SET_STRING

pull/37/head
yuqing 2018-09-10 21:21:54 +08:00
parent b2dd1c322e
commit ce98e53ae2
1 changed files with 9 additions and 0 deletions

View File

@ -217,6 +217,15 @@ typedef void* (*MallocFunc)(size_t size);
#define __gcc_attribute__(x)
#endif
//for printf format %.*s
#define FC_PRINTF_STAR_STRING_PARAMS(s) (s).len, (s).str
#define FC_SET_STRING(dest, src) \
do { \
(dest).str = src; \
(dest).len = strlen(src); \
} while (0)
#define fc_compare_string(s1, s2) fc_string_compare(s1, s2)
static inline int fc_string_compare(const string_t *s1, const string_t *s2)