aboutsummaryrefslogtreecommitdiff
path: root/vendor
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-08-08 13:29:49 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-08-08 13:29:49 +0100
commit804984ed35faceee3e7629dff0c8d9df86db3d98 (patch)
tree7c3ff702b4fc0ce739e1f7cbb3bf7768da53a0cd /vendor
parent7c93a5ae802b5a17aff6fea7368f9b27deed6517 (diff)
`contextless` fixes for `js`
Diffstat (limited to 'vendor')
-rw-r--r--vendor/libc/libc.odin4
-rw-r--r--vendor/libc/stdlib.odin2
-rw-r--r--vendor/wgpu/wgpu_js.odin2
3 files changed, 4 insertions, 4 deletions
diff --git a/vendor/libc/libc.odin b/vendor/libc/libc.odin
index 00d687109..3ec25aacf 100644
--- a/vendor/libc/libc.odin
+++ b/vendor/libc/libc.odin
@@ -10,8 +10,8 @@ g_ctx: runtime.Context
g_allocator: mem.Compat_Allocator
@(init)
-init_context :: proc() {
- g_ctx = context
+init_context :: proc "contextless" () {
+ g_ctx = runtime.default_context()
// Wrapping the allocator with the mem.Compat_Allocator so we can
// mimic the realloc semantics.
diff --git a/vendor/libc/stdlib.odin b/vendor/libc/stdlib.odin
index 9f578a436..bb9233a28 100644
--- a/vendor/libc/stdlib.odin
+++ b/vendor/libc/stdlib.odin
@@ -169,7 +169,7 @@ exit :: proc "c" (exit_code: c.int) -> ! {
}
@(private, fini)
-finish_atexit :: proc "c" () {
+finish_atexit :: proc "contextless" () {
n := intrinsics.atomic_exchange(&atexit_functions_count, 0)
for function in atexit_functions[:n] {
function()
diff --git a/vendor/wgpu/wgpu_js.odin b/vendor/wgpu/wgpu_js.odin
index 3c8375adb..3217a97dc 100644
--- a/vendor/wgpu/wgpu_js.odin
+++ b/vendor/wgpu/wgpu_js.odin
@@ -5,7 +5,7 @@ import "base:runtime"
g_context: runtime.Context
@(private="file", init)
-wgpu_init_allocator :: proc() {
+wgpu_init_allocator :: proc "contextless" () {
if g_context.allocator.procedure == nil {
g_context = runtime.default_context()
}