Browse Source

Fix more procedure to be `contextless`

gingerBill 1 month ago
parent
commit
d381d0ece4

+ 1 - 1
core/flags/rtti.odin

@@ -38,6 +38,6 @@ Note that only one can be active at a time.
 Inputs:
 Inputs:
 - setter: The type setter. Pass `nil` to disable any previously set setter.
 - setter: The type setter. Pass `nil` to disable any previously set setter.
 */
 */
-register_type_setter :: proc(setter: Custom_Type_Setter) {
+register_type_setter :: proc "contextless" (setter: Custom_Type_Setter) {
 	global_custom_type_setter = setter
 	global_custom_type_setter = setter
 }
 }

+ 1 - 1
core/sys/posix/stdlib_libc.odin

@@ -60,7 +60,7 @@ wctomb        :: libc.wctomb
 mbstowcs      :: libc.mbstowcs
 mbstowcs      :: libc.mbstowcs
 wcstombs      :: libc.wcstombs
 wcstombs      :: libc.wcstombs
 
 
-free :: #force_inline proc(ptr: $T) where intrinsics.type_is_pointer(T) || intrinsics.type_is_multi_pointer(T) || T == cstring {
+free :: #force_inline proc "c" (ptr: $T) where intrinsics.type_is_pointer(T) || intrinsics.type_is_multi_pointer(T) || T == cstring {
 	libc.free(rawptr(ptr))
 	libc.free(rawptr(ptr))
 }
 }
 
 

+ 1 - 1
tests/core/flags/test_core_flags.odin

@@ -17,7 +17,7 @@ Custom_Data :: struct {
 }
 }
 
 
 @(init)
 @(init)
-init_custom_type_setter :: proc() {
+init_custom_type_setter :: proc "contextless" () {
 	// NOTE: This is done here so it can be out of the flow of the
 	// NOTE: This is done here so it can be out of the flow of the
 	// multi-threaded test runner, to prevent any data races that could be
 	// multi-threaded test runner, to prevent any data races that could be
 	// reported by using `-sanitize:thread`.
 	// reported by using `-sanitize:thread`.

+ 2 - 2
tests/core/normal.odin

@@ -2,10 +2,10 @@ package tests_core
 
 
 import rlibc "core:c/libc"
 import rlibc "core:c/libc"
 
 
-@(init)
+@(init="contextless")
 download_assets :: proc() {
 download_assets :: proc() {
 	if rlibc.system("python3 " + ODIN_ROOT + "tests/core/download_assets.py " + ODIN_ROOT + "tests/core/assets") != 0 {
 	if rlibc.system("python3 " + ODIN_ROOT + "tests/core/download_assets.py " + ODIN_ROOT + "tests/core/assets") != 0 {
-		panic("downloading test assets failed!")
+		panic_contextless("downloading test assets failed!")
 	}
 	}
 }
 }