aboutsummaryrefslogtreecommitdiff
path: root/core/runtime
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2020-05-14 00:13:26 +0100
committergingerBill <bill@gingerbill.org>2020-05-14 00:13:26 +0100
commitf661d3404952d33d4cb683899ebd05d4b580b2bc (patch)
tree79f957be88db8740ebdf214a8107672f88a67052 /core/runtime
parentaf1d4d6e72eeb75b32c40f3d4ca7bf6a78e8a043 (diff)
Implement Explicit context creation #639
Diffstat (limited to 'core/runtime')
-rw-r--r--core/runtime/core.odin6
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;