1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 11:38:21 +02:00

Unbuffering stdout

This commit is contained in:
Brian Fiete 2024-10-22 12:48:14 -04:00
parent bc5c425d1b
commit 4a819762e6
3 changed files with 17 additions and 6 deletions

View file

@ -90,13 +90,12 @@ namespace System
static function void(StringView str) OutString = => OutString_Simple;
public static extern void PutChar(char8 c);
private static extern void PutChars(char8* c, int32 len);
public static extern void ReopenHandles();
static void OutString_Simple(StringView str)
{
for (var c in str.RawChars)
PutChar(c);
PutChars(str.Ptr, (.)str.Length);
}
static void OutString_Ex(StringView str)