diff options
| author | gingerBill <bill@gingerbill.org> | 2020-05-14 00:13:26 +0100 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2020-05-14 00:13:26 +0100 |
| commit | f661d3404952d33d4cb683899ebd05d4b580b2bc (patch) | |
| tree | 79f957be88db8740ebdf214a8107672f88a67052 /core/runtime | |
| parent | af1d4d6e72eeb75b32c40f3d4ca7bf6a78e8a043 (diff) | |
Implement Explicit context creation #639
Diffstat (limited to 'core/runtime')
| -rw-r--r-- | core/runtime/core.odin | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/core/runtime/core.odin b/core/runtime/core.odin index d3cccd02a..c1ecc4b9c 100644 --- a/core/runtime/core.odin +++ b/core/runtime/core.odin @@ -440,6 +440,12 @@ default_logger :: proc() -> Logger { } +default_context :: proc "contextless" () -> Context { + c: Context; + __init_context(&c); + return c; +} + @private __init_context_from_ptr :: proc "contextless" (c: ^Context, other: ^Context) { if c == nil do return; |