Moved EV_STR_evstring_MAGIC to header part so that evstr(...) can use it

Signed-off-by: Robear Selwans <robear.selwans@outlook.com>
This commit is contained in:
2022-01-30 16:17:21 +00:00
parent 34450de16d
commit 7ec5d242aa

View File

@@ -10,6 +10,8 @@
#include <stddef.h> #include <stddef.h>
#include <stdarg.h> #include <stdarg.h>
#define EV_STR_evstring_MAGIC (0x65767374)
#ifdef EV_STR_SHARED #ifdef EV_STR_SHARED
#if defined (EV_STR_IMPL) #if defined (EV_STR_IMPL)
#define EV_STR_API EV_EXPORT #define EV_STR_API EV_EXPORT
@@ -203,8 +205,6 @@ evstring_findLastChar(
#define META(s) (((struct evstr_meta_t *)(s)) - 1) #define META(s) (((struct evstr_meta_t *)(s)) - 1)
#define EV_STR_evstring_MAGIC (0x65767374)
#if EV_BUILDTYPE_DEBUG || EV_BUILDTYPE_DEBUGOPT #if EV_BUILDTYPE_DEBUG || EV_BUILDTYPE_DEBUGOPT
#define evstr_asserttype(str) \ #define evstr_asserttype(str) \
assert(META(str)->magic == EV_STR_evstring_MAGIC) assert(META(str)->magic == EV_STR_evstring_MAGIC)