mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Reworked Toy_String as a union, enabled -Wpedantic
Toy now fits into the C spec. Fixed #158 Addendum: MacOS test caught an error: error: a function declaration without a prototype is deprecated in all versions of C That took 3 attempts to fix correctly. Addendum: 'No new line at the end of file' are you shitting me?
This commit is contained in:
@@ -379,14 +379,14 @@ static void debugScopePrint(Toy_Scope* scope, int depth) {
|
||||
|
||||
printf("Scope %d Dump\n-------------------------\ntype\tname\tvalue\n", depth);
|
||||
for (unsigned int i = 0; i < scope->table->capacity; i++) {
|
||||
if ( (TOY_VALUE_IS_STRING(scope->table->data[i].key) && TOY_VALUE_AS_STRING(scope->table->data[i].key)->type == TOY_STRING_NAME) != true) {
|
||||
if ( (TOY_VALUE_IS_STRING(scope->table->data[i].key) && TOY_VALUE_AS_STRING(scope->table->data[i].key)->info.type == TOY_STRING_NAME) != true) {
|
||||
continue;
|
||||
}
|
||||
|
||||
Toy_Value k = scope->table->data[i].key;
|
||||
Toy_Value v = scope->table->data[i].value;
|
||||
|
||||
printf("%s\t%s\t", Toy_private_getValueTypeAsCString(v.type), TOY_VALUE_AS_STRING(k)->as.name.data);
|
||||
printf("%s\t%s\t", Toy_private_getValueTypeAsCString(v.type), TOY_VALUE_AS_STRING(k)->name.data);
|
||||
|
||||
//print value
|
||||
Toy_String* string = Toy_stringifyValue(&stringBucket, Toy_unwrapValue(v));
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
#compiler settings
|
||||
CC=gcc
|
||||
CFLAGS+=-std=c17 -g -Wall -Werror -Wextra -Wpointer-arith -Wformat=2
|
||||
CFLAGS+=-std=c17 -g -Wall -Werror -Wextra -Wpedantic -Wformat=2
|
||||
LIBS+=-lm -lToy
|
||||
LDFLAGS+=-Wl,-rpath,'$$ORIGIN'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user