Renemed all variables to fit into a namespace

Basically, all Toy varaibles, functions, etc. are prepended with "Toy_",
and macros are prepended with "TOY_". This is to reduce namespace
pollution, which was an issue pointed out to be - blame @GyroVorbis.

I've also bumped the minor version number - theoretically I should bump
the major number, but I'm not quite ready for 1.0 yet.
This commit is contained in:
2023-01-25 12:52:07 +00:00
parent 047ccc5f16
commit 2e2bee4fa3
55 changed files with 4837 additions and 4707 deletions

View File

@@ -1,16 +1,16 @@
#include "literal_dictionary.h"
#include "toy_literal_dictionary.h"
#include "memory.h"
#include "console_colors.h"
#include "toy_memory.h"
#include "toy_console_colors.h"
#include <stdio.h>
int main() {
{
//test init & cleanup
LiteralDictionary dictionary;
initLiteralDictionary(&dictionary);
freeLiteralDictionary(&dictionary);
Toy_LiteralDictionary dictionary;
Toy_initLiteralDictionary(&dictionary);
Toy_freeLiteralDictionary(&dictionary);
}
{
@@ -18,21 +18,21 @@ int main() {
char* idn_raw = "foobar";
char* str_raw = "hello world";
Literal identifier = TO_IDENTIFIER_LITERAL(createRefString(idn_raw));
Literal string = TO_STRING_LITERAL(createRefString(str_raw));
Toy_Literal identifier = TOY_TO_IDENTIFIER_LITERAL(Toy_createRefString(idn_raw));
Toy_Literal string = TOY_TO_STRING_LITERAL(Toy_createRefString(str_raw));
LiteralDictionary dictionary;
initLiteralDictionary(&dictionary);
Toy_LiteralDictionary dictionary;
Toy_initLiteralDictionary(&dictionary);
setLiteralDictionary(&dictionary, identifier, string);
Toy_setLiteralDictionary(&dictionary, identifier, string);
freeLiteral(identifier);
freeLiteral(string);
Toy_freeLiteral(identifier);
Toy_freeLiteral(string);
freeLiteralDictionary(&dictionary);
Toy_freeLiteralDictionary(&dictionary);
}
printf(NOTICE "All good\n" RESET);
printf(TOY_CC_NOTICE "All good\n" TOY_CC_RESET);
return 0;
}