mirror of
https://github.com/krgamestudios/Toy.git
synced 2026-04-15 14:54:07 +10:00
Toy_String now fragments strings that are too long
This commit is contained in:
@@ -5,9 +5,6 @@
|
||||
#include "toy_bucket.h"
|
||||
#include "toy_value.h"
|
||||
|
||||
//TODO: Remove this (related to partitioning more space in a bucket issue)
|
||||
#define TOY_STRING_MAX_LENGTH 1000
|
||||
|
||||
//rope pattern
|
||||
typedef struct Toy_String { //32 | 64 BITNESS
|
||||
enum Toy_StringType {
|
||||
@@ -39,7 +36,7 @@ typedef struct Toy_String { //32 | 64 BITNESS
|
||||
} Toy_String; //24 | 32
|
||||
|
||||
TOY_API Toy_String* Toy_createString(Toy_Bucket** bucketHandle, const char* cstring);
|
||||
TOY_API Toy_String* Toy_createStringLength(Toy_Bucket** bucketHandle, const char* cstring, int length);
|
||||
TOY_API Toy_String* Toy_createStringLength(Toy_Bucket** bucketHandle, const char* cstring, unsigned int length);
|
||||
|
||||
TOY_API Toy_String* Toy_createNameString(Toy_Bucket** bucketHandle, const char* cname, Toy_ValueType type); //for variable names
|
||||
|
||||
@@ -50,8 +47,8 @@ TOY_API Toy_String* Toy_concatStrings(Toy_Bucket** bucketHandle, Toy_String* lef
|
||||
|
||||
TOY_API void Toy_freeString(Toy_String* str);
|
||||
|
||||
TOY_API int Toy_getStringLength(Toy_String* str);
|
||||
TOY_API int Toy_getStringRefCount(Toy_String* str);
|
||||
TOY_API unsigned int Toy_getStringLength(Toy_String* str);
|
||||
TOY_API unsigned int Toy_getStringRefCount(Toy_String* str);
|
||||
|
||||
TOY_API char* Toy_getStringRawBuffer(Toy_String* str); //allocates the buffer on the heap, needs to be freed
|
||||
|
||||
|
||||
Reference in New Issue
Block a user