1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Support for comptime file IO and process creation

This commit is contained in:
Brian Fiete 2021-12-20 09:39:39 -05:00
parent 045e706600
commit ce4b6e04de
19 changed files with 726 additions and 89 deletions

View file

@ -622,7 +622,17 @@ public:
str.mLength = (int_strsize)strlen(charPtr);
str.mAllocSizeAndFlags = str.mLength | StrPtrFlag;
return str;
}
}
static StringImpl MakeRef(const char* charPtr, intptr length)
{
StringImpl str;
// This is just a ref - called when we pass a literal to a method (for example)
str.mPtr = (char*)charPtr;
str.mLength = (int_strsize)length;
str.mAllocSizeAndFlags = str.mLength | StrPtrFlag;
return str;
}
static StringImpl MakeRef(const StringView& strView)
{