Overrideable stdin, stdout, stderr at the context level

This commit is contained in:
gingerBill
2019-03-30 14:51:42 +00:00
parent a019059975
commit 68d4bde82f
3 changed files with 15 additions and 7 deletions
+8
View File
@@ -213,6 +213,10 @@ Context :: struct {
assertion_failure_proc: Assertion_Failure_Proc,
logger: log.Logger,
stdin: os.Handle,
stdout: os.Handle,
stderr: os.Handle,
thread_id: int,
user_data: any,
@@ -350,6 +354,10 @@ __init_context :: proc "contextless" (c: ^Context) {
c.logger.procedure = log.nil_logger_proc;
c.logger.data = nil;
c.stdin = os.stdin;
c.stdout = os.stdout;
c.stderr = os.stderr;
}
@builtin