nodemcu-firmware/app/sjson/memcompat.h
Johny Mattsson ea4d33715f Cleaned up sjson module build.
- Move jsonsl build to regular library build rather than #include the .c file
- Provide wrappers for malloc/calloc/free to fix undefined symbol warnings.
2017-07-03 13:35:45 +10:00

12 lines
292 B
C

#ifndef __MEMCOMPAT_H__
#define __MEMCOMPAT_H__
#include "c_types.h"
#include "mem.h"
static inline void *malloc(size_t sz) { return os_malloc(sz); }
static inline void free(void *p) { return os_free(p); }
static inline void *calloc(size_t n, size_t sz) { return os_zalloc(n*sz); }
#endif