Ver Fonte

Use macro instead of enum to define MEM_ALLOCATOR for better compatibility (#399)

Co-authored-by: Huang Qi <huangqi3@xiaomi.com>
Huang Qi há 5 anos atrás
pai
commit
b639c3ce61
1 ficheiros alterados com 2 adições e 6 exclusões
  1. 2 6
      core/config.h

+ 2 - 6
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