Wrap all calls to malloc and friends
This commit is contained in:
parent
19b776e74d
commit
87316f22f3
9 changed files with 79 additions and 22 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue