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

@@ -2,19 +2,19 @@
#include "toy_common.h"
#include "literal.h"
#include "toy_literal.h"
typedef struct LiteralArray {
Literal* literals;
typedef struct Toy_LiteralArray {
Toy_Literal* literals;
int capacity;
int count;
} LiteralArray;
} Toy_LiteralArray;
TOY_API void initLiteralArray(LiteralArray* array);
TOY_API void freeLiteralArray(LiteralArray* array);
TOY_API int pushLiteralArray(LiteralArray* array, Literal literal);
TOY_API Literal popLiteralArray(LiteralArray* array);
TOY_API bool setLiteralArray(LiteralArray* array, Literal index, Literal value);
TOY_API Literal getLiteralArray(LiteralArray* array, Literal index);
TOY_API void Toy_initLiteralArray(Toy_LiteralArray* array);
TOY_API void Toy_freeLiteralArray(Toy_LiteralArray* array);
TOY_API int Toy_pushLiteralArray(Toy_LiteralArray* array, Toy_Literal literal);
TOY_API Toy_Literal Toy_popLiteralArray(Toy_LiteralArray* array);
TOY_API bool Toy_setLiteralArray(Toy_LiteralArray* array, Toy_Literal index, Toy_Literal value);
TOY_API Toy_Literal Toy_getLiteralArray(Toy_LiteralArray* array, Toy_Literal index);
int findLiteralIndex(LiteralArray* array, Literal literal);
int Toy_findLiteralIndex(Toy_LiteralArray* array, Toy_Literal literal);