Wrap all calls to malloc and friends

This commit is contained in:
Max Brunsfeld 2016-01-15 15:08:42 -08:00
parent 19b776e74d
commit 87316f22f3
9 changed files with 79 additions and 22 deletions

View file

@ -1,4 +1,5 @@
#include "runtime/string_input.h"
#include "runtime/alloc.h"
#include <string.h>
typedef struct {
@ -26,7 +27,7 @@ int ts_string_input_seek(void *payload, size_t character, size_t byte) {
}
TSInput ts_string_input_make(const char *string) {
TSStringInput *input = malloc(sizeof(TSStringInput));
TSStringInput *input = ts_malloc(sizeof(TSStringInput));
input->string = string;
input->position = 0;
input->length = strlen(string);