diff --git a/source/toy.h b/source/toy.h index 97f0f66..7b11af2 100644 --- a/source/toy.h +++ b/source/toy.h @@ -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 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_refstring.h" - +#include "toy_reffunction.h" diff --git a/source/toy_common.h b/source/toy_common.h index 202072a..1e3cb1d 100644 --- a/source/toy_common.h +++ b/source/toy_common.h @@ -6,7 +6,7 @@ #define TOY_VERSION_MAJOR 1 #define TOY_VERSION_MINOR 1 -#define TOY_VERSION_PATCH 3 +#define TOY_VERSION_PATCH 4 #define TOY_VERSION_BUILD __DATE__ " " __TIME__ //platform/compiler-specific instructions diff --git a/source/toy_console_colors.h b/source/toy_console_colors.h index c1428f7..3469f55 100644 --- a/source/toy_console_colors.h +++ b/source/toy_console_colors.h @@ -1,6 +1,16 @@ #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 #if defined(__linux__) || defined(__MINGW32__) || defined(__GNUC__) diff --git a/source/toy_memory.c b/source/toy_memory.c index 80d6172..9975b94 100644 --- a/source/toy_memory.c +++ b/source/toy_memory.c @@ -1,5 +1,6 @@ #include "toy_memory.h" #include "toy_refstring.h" +#include "toy_reffunction.h" #include "toy_console_colors.h" @@ -49,4 +50,5 @@ void Toy_setMemoryAllocator(Toy_MemoryAllocatorFn fn) { allocator = fn; Toy_setRefStringAllocatorFn(fn); + Toy_setRefFunctionAllocatorFn(fn); }