From 5a8dbc6347b3541e84fe669b22c17ad3b715e258 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Wed, 21 Jan 2026 20:22:09 +0100 Subject: Engage! --- .../mitjafelicijan/go-tree-sitter/alloc.h | 41 ++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 vendor/github.com/mitjafelicijan/go-tree-sitter/alloc.h (limited to 'vendor/github.com/mitjafelicijan/go-tree-sitter/alloc.h') diff --git a/vendor/github.com/mitjafelicijan/go-tree-sitter/alloc.h b/vendor/github.com/mitjafelicijan/go-tree-sitter/alloc.h new file mode 100644 index 0000000..a0eadb7 --- /dev/null +++ b/vendor/github.com/mitjafelicijan/go-tree-sitter/alloc.h @@ -0,0 +1,41 @@ +#ifndef TREE_SITTER_ALLOC_H_ +#define TREE_SITTER_ALLOC_H_ + +#ifdef __cplusplus +extern "C" { +#endif + +#include +#include +#include + +#if defined(TREE_SITTER_HIDDEN_SYMBOLS) || defined(_WIN32) +#define TS_PUBLIC +#else +#define TS_PUBLIC __attribute__((visibility("default"))) +#endif + +TS_PUBLIC extern void *(*ts_current_malloc)(size_t); +TS_PUBLIC extern void *(*ts_current_calloc)(size_t, size_t); +TS_PUBLIC extern void *(*ts_current_realloc)(void *, size_t); +TS_PUBLIC extern void (*ts_current_free)(void *); + +// Allow clients to override allocation functions +#ifndef ts_malloc +#define ts_malloc ts_current_malloc +#endif +#ifndef ts_calloc +#define ts_calloc ts_current_calloc +#endif +#ifndef ts_realloc +#define ts_realloc ts_current_realloc +#endif +#ifndef ts_free +#define ts_free ts_current_free +#endif + +#ifdef __cplusplus +} +#endif + +#endif // TREE_SITTER_ALLOC_H_ -- cgit v1.2.3