From b639c3ce61a68aef8e75c5becf9d2877c05d0a12 Mon Sep 17 00:00:00 2001 From: Huang Qi <757509347@qq.com> Date: Thu, 24 Sep 2020 10:48:34 +0800 Subject: [PATCH] Use macro instead of enum to define MEM_ALLOCATOR for better compatibility (#399) Co-authored-by: Huang Qi --- core/config.h | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/core/config.h b/core/config.h index 1c932a65..26aa715a 100644 --- a/core/config.h +++ b/core/config.h @@ -43,12 +43,8 @@ #define BH_DEBUG 0 #endif -enum { - /* Memory allocator ems */ - MEM_ALLOCATOR_EMS = 0, - /* Memory allocator tlsf */ - MEM_ALLOCATOR_TLSF -}; +#define MEM_ALLOCATOR_EMS 0 +#define MEM_ALLOCATOR_TLSF 1 /* Default memory allocator */ #define DEFAULT_MEM_ALLOCATOR MEM_ALLOCATOR_EMS