mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 23:04:08 +10:00
Forgot memory allocator for reffunctions
This commit is contained in:
@@ -61,8 +61,10 @@ to the same string to save memory, and you can just create a new one of these va
|
|||||||
rather than copying entirely for a speed boost. This module has it's own memory allocator system that is
|
rather than copying entirely for a speed boost. This module has it's own memory allocator system that is
|
||||||
plugged into the main memory allocator.
|
plugged into the main memory allocator.
|
||||||
|
|
||||||
|
`Toy_RefFunction` acts similarly to `Toy_RefString`, but instead operates on function bytecode.
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "toy_scope.h"
|
#include "toy_scope.h"
|
||||||
#include "toy_refstring.h"
|
#include "toy_refstring.h"
|
||||||
|
#include "toy_reffunction.h"
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
|
|
||||||
#define TOY_VERSION_MAJOR 1
|
#define TOY_VERSION_MAJOR 1
|
||||||
#define TOY_VERSION_MINOR 1
|
#define TOY_VERSION_MINOR 1
|
||||||
#define TOY_VERSION_PATCH 3
|
#define TOY_VERSION_PATCH 4
|
||||||
#define TOY_VERSION_BUILD __DATE__ " " __TIME__
|
#define TOY_VERSION_BUILD __DATE__ " " __TIME__
|
||||||
|
|
||||||
//platform/compiler-specific instructions
|
//platform/compiler-specific instructions
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
//NOTE: you need both font AND background for these to work
|
/* toy_console_colors.h - console utility
|
||||||
|
|
||||||
|
This file provides a number of macros that can set the color of text in a console
|
||||||
|
window. These are used for convenience only. They are supposed to be dropped into
|
||||||
|
a printf()'s first argument, like so:
|
||||||
|
|
||||||
|
printf(TOY_CC_NOTICE "Hello world" TOY_CC_RESET);
|
||||||
|
|
||||||
|
NOTE: you need both font AND background for these to work
|
||||||
|
|
||||||
|
*/
|
||||||
|
|
||||||
//platform/compiler-specific instructions
|
//platform/compiler-specific instructions
|
||||||
#if defined(__linux__) || defined(__MINGW32__) || defined(__GNUC__)
|
#if defined(__linux__) || defined(__MINGW32__) || defined(__GNUC__)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "toy_memory.h"
|
#include "toy_memory.h"
|
||||||
#include "toy_refstring.h"
|
#include "toy_refstring.h"
|
||||||
|
#include "toy_reffunction.h"
|
||||||
|
|
||||||
#include "toy_console_colors.h"
|
#include "toy_console_colors.h"
|
||||||
|
|
||||||
@@ -49,4 +50,5 @@ void Toy_setMemoryAllocator(Toy_MemoryAllocatorFn fn) {
|
|||||||
|
|
||||||
allocator = fn;
|
allocator = fn;
|
||||||
Toy_setRefStringAllocatorFn(fn);
|
Toy_setRefStringAllocatorFn(fn);
|
||||||
|
Toy_setRefFunctionAllocatorFn(fn);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user