mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Minor tweak
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
#include "toy_literal.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//static math utils, copied from the interpreter
|
||||
static Toy_Literal addition(Toy_Interpreter* interpreter, Toy_Literal lhs, Toy_Literal rhs) {
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "toy_console_colors.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
void Toy_initCompiler(Toy_Compiler* compiler) {
|
||||
Toy_initLiteralArray(&compiler->literalCache);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "toy_console_colors.h"
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
//hash util functions
|
||||
static unsigned int hashString(const char* string, int length) {
|
||||
|
||||
@@ -12,8 +12,6 @@ typedef int (*Toy_NativeFn)(struct Toy_Interpreter* interpreter, struct Toy_Lite
|
||||
typedef int (*Toy_HookFn)(struct Toy_Interpreter* interpreter, struct Toy_Literal identifier, struct Toy_Literal alias);
|
||||
typedef void (*Toy_PrintFn)(const char*);
|
||||
|
||||
#include <string.h>
|
||||
|
||||
typedef enum {
|
||||
TOY_LITERAL_NULL,
|
||||
TOY_LITERAL_BOOLEAN,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
#include "toy_refstring.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
//memory allocation
|
||||
extern void* Toy_private_defaultMemoryAllocator(void* pointer, size_t oldSize, size_t newSize);
|
||||
static Toy_RefStringAllocatorFn allocate = Toy_private_defaultMemoryAllocator;
|
||||
|
||||
@@ -1,10 +1,9 @@
|
||||
#pragma once
|
||||
|
||||
#include <stdbool.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "toy_common.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
//memory allocation hook
|
||||
typedef void* (*Toy_RefStringAllocatorFn)(void* pointer, size_t oldSize, size_t newSize);
|
||||
TOY_API void Toy_setRefStringAllocatorFn(Toy_RefStringAllocatorFn);
|
||||
|
||||
Reference in New Issue
Block a user