Skip to content

Commit 8ebf32e

Browse files
committed
1 parent 3e1532c commit 8ebf32e

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

include/mrc_common.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
#define mrb_state void
2121
#endif
2222

23+
#if !defined(MRC_TARGET_MRUBY) && !defined(PICORB_VM_MRUBYC)
24+
/* May be building mrbc (picorbc) */
25+
#define mrb_state void
26+
#endif
27+
2328
#if !defined(PRISM_XALLOCATOR)
2429
#define PRISM_XALLOCATOR
2530
#endif

include/prism_xallocator.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,15 @@
3030
#define mrc_realloc(c,ptr,size) mrbc_raw_realloc(ptr, size)
3131
#define mrc_free(c,ptr) mrbc_raw_free(ptr)
3232
#endif
33+
#else /* May be building mrbc (picorbc) */
34+
#define mrc_malloc(c,size) malloc(size)
35+
#define mrc_calloc(c,nmemb,size) calloc(nmemb, size)
36+
#define mrc_realloc(c,ptr,size) realloc(ptr, size)
37+
#define mrc_free(c,ptr) free(ptr)
38+
#define xmalloc(size) malloc(size)
39+
#define xcalloc(nmemb,size) calloc(nmemb, size)
40+
#define xrealloc(ptr,size) realloc(ptr, size)
41+
#define xfree(ptr) free(ptr)
3342
#endif
3443

3544
#endif

0 commit comments

Comments
 (0)