refactor: change ObjString length field from size_t to int for consistency and reduced memory usage

The length field in ObjString struct now uses int instead of size_t, saving memory
and aligning with other string length storage conventions throughout the VM.
This eliminates signed/unsigned conversion warnings and matches the type used
elsewhere for string lengths.
This commit is contained in:
Bob Nystrom
2015-01-08 15:41:30 +00:00
parent a48edd5874
commit 041e6213d5
+1 -1
View File
@@ -109,7 +109,7 @@ typedef struct
{
Obj obj;
// Does not include the null terminator.
size_t length;
int length;
char value[];
} ObjString;