From 0656a41cf7e04f0eb34d508e867f1c623229f3b8 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Wed, 6 Mar 2024 16:44:38 -0500 Subject: [PATCH] Move context_ext to its own file Will be adding context related features here in the future --- code/grime.odin | 6 ++---- code/grime_context.odin | 5 +++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 code/grime_context.odin diff --git a/code/grime.odin b/code/grime.odin index 80c9af2..0e2a233 100644 --- a/code/grime.odin +++ b/code/grime.odin @@ -1,3 +1,4 @@ + package sectr // At least its less than C/C++ ... @@ -45,6 +46,7 @@ import "core:mem" tracking_allocator :: mem.tracking_allocator tracking_allocator_init :: mem.tracking_allocator_init import "core:mem/virtual" + VirtualProtectFlags :: virtual.Protect_Flags import "core:odin" SourceCodeLocation :: runtime.Source_Code_Location import "core:os" @@ -73,10 +75,6 @@ import "core:unicode/utf8" OS_Type :: type_of(ODIN_OS) -context_ext :: proc( $ Type : typeid ) -> (^Type) { - return cast(^Type) context.user_ptr -} - // Proc Name Overloads Alias table // This has to be done on a per-module basis. Most likely can be automated diff --git a/code/grime_context.odin b/code/grime_context.odin new file mode 100644 index 0000000..110eea9 --- /dev/null +++ b/code/grime_context.odin @@ -0,0 +1,5 @@ +package sectr + +context_ext :: proc( $ Type : typeid ) -> (^Type) { + return cast(^Type) context.user_ptr +}