mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 17:06:30 +00:00
tree-sitter: change vendored tree-sitter to use nvim memory management
This commit is contained in:
@@ -9,7 +9,20 @@ extern "C" {
|
||||
#include <stdbool.h>
|
||||
#include <stdio.h>
|
||||
|
||||
#if defined(TREE_SITTER_TEST)
|
||||
#include "nvim/memory.h"
|
||||
|
||||
#if 1
|
||||
|
||||
static inline bool ts_toggle_allocation_recording(bool value) {
|
||||
return false;
|
||||
}
|
||||
|
||||
#define ts_malloc xmalloc
|
||||
#define ts_calloc xcalloc
|
||||
#define ts_realloc xrealloc
|
||||
#define ts_free xfree
|
||||
|
||||
#elif defined(TREE_SITTER_TEST)
|
||||
|
||||
void *ts_record_malloc(size_t);
|
||||
void *ts_record_calloc(size_t, size_t);
|
||||
|
Reference in New Issue
Block a user