Move context_ext to its own file

Will be adding context related features here in the future
This commit is contained in:
Edward R. Gonzalez 2024-03-06 16:44:38 -05:00
parent 59ad47162d
commit 0656a41cf7
2 changed files with 7 additions and 4 deletions

View File

@ -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

5
code/grime_context.odin Normal file
View File

@ -0,0 +1,5 @@
package sectr
context_ext :: proc( $ Type : typeid ) -> (^Type) {
return cast(^Type) context.user_ptr
}