Fix wrong allocator

This commit is contained in:
Stephan Hadinger 2021-05-22 09:49:37 +02:00
parent eea82b5049
commit 3881508b00
1 changed files with 2 additions and 2 deletions

View File

@ -59,11 +59,11 @@ extern "C" {
#define BERRY_LOGSZ 700
#endif
extern "C" {
extern void *lvbe_malloc(size_t size);
extern void *berry_malloc(size_t size);
}
static char * log_berry_buffer = nullptr;
static_block {
log_berry_buffer = (char*) lvbe_malloc(BERRY_LOGSZ);
log_berry_buffer = (char*) berry_malloc(BERRY_LOGSZ);
if (log_berry_buffer) log_berry_buffer[0] = 0;
}
extern void berry_log(const char * berry_buf);