mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Minimal build of the refstrings in the literal structure
This commit is contained in:
@@ -29,22 +29,18 @@ int main() {
|
||||
|
||||
{
|
||||
//test string literals
|
||||
char* buffer = ALLOCATE(char, 128);
|
||||
char* buffer = "Hello world";
|
||||
|
||||
snprintf(buffer, 128, "Hello world");
|
||||
|
||||
Literal literal = TO_STRING_LITERAL(buffer, 128);
|
||||
Literal literal = TO_STRING_LITERAL(createRefString(buffer));
|
||||
|
||||
freeLiteral(literal);
|
||||
}
|
||||
|
||||
{
|
||||
//test identifier literals
|
||||
char* buffer = ALLOCATE(char, 128);
|
||||
char buffer[] = "Hello world";
|
||||
|
||||
snprintf(buffer, 128, "foobar");
|
||||
|
||||
Literal literal = TO_IDENTIFIER_LITERAL(buffer, 128);
|
||||
Literal literal = TO_IDENTIFIER_LITERAL(createRefString(buffer));
|
||||
|
||||
freeLiteral(literal);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user