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 +}