From cdae03bd5473c10ba1f1a28b3a22d35ac9482c91 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Tue, 14 Feb 2023 17:38:10 +0000 Subject: [PATCH] String and identifier making fixed for MSVC, just in case --- source/toy_literal.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/toy_literal.c b/source/toy_literal.c index 37293ff..2f42478 100644 --- a/source/toy_literal.c +++ b/source/toy_literal.c @@ -84,11 +84,11 @@ bool Toy_private_isTruthy(Toy_Literal x) { } Toy_Literal Toy_private_toStringLiteral(Toy_RefString* ptr) { - return ((Toy_Literal){{ .string.ptr = ptr },TOY_LITERAL_STRING, 0}); + return ((Toy_Literal){{ .string = { .ptr = ptr }},TOY_LITERAL_STRING, 0}); } Toy_Literal Toy_private_toIdentifierLiteral(Toy_RefString* ptr) { - return ((Toy_Literal){{ .identifier.ptr = ptr, .identifier.hash = hashString(Toy_toCString(ptr), Toy_lengthRefString(ptr)) },TOY_LITERAL_IDENTIFIER, 0}); + return ((Toy_Literal){{ .identifier = { .ptr = ptr, .hash = hashString(Toy_toCString(ptr), Toy_lengthRefString(ptr)) }},TOY_LITERAL_IDENTIFIER, 0}); } Toy_Literal* Toy_private_typePushSubtype(Toy_Literal* lit, Toy_Literal subtype) {