diff options
author | Sam Clegg <sbc@chromium.org> | 2022-07-13 17:00:27 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 17:00:27 -0700 |
commit | 54c55355c95fdbe5288c7f690fe63f626bb26b7d (patch) | |
tree | 001b67f246d2ef64ebe375ccfa418a3649e1d7f5 /wasm2c/wasm-rt-impl.h | |
parent | a7d484ef3d1f64649dd9f48cb1d5434f0fda561b (diff) | |
download | wabt-54c55355c95fdbe5288c7f690fe63f626bb26b7d.tar.gz wabt-54c55355c95fdbe5288c7f690fe63f626bb26b7d.tar.bz2 wabt-54c55355c95fdbe5288c7f690fe63f626bb26b7d.zip |
wasm2c: Use static for wasm-rt globals. NFC (#1945)
And use the `wasm_rt_` prefix for the one non-static global.
While reviewing #1930 I noticed these globals could/should be static.
Diffstat (limited to 'wasm2c/wasm-rt-impl.h')
-rw-r--r-- | wasm2c/wasm-rt-impl.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/wasm2c/wasm-rt-impl.h b/wasm2c/wasm-rt-impl.h index 1b908bcd..c275bbf6 100644 --- a/wasm2c/wasm-rt-impl.h +++ b/wasm2c/wasm-rt-impl.h @@ -26,7 +26,7 @@ extern "C" { #endif /** A setjmp buffer used for handling traps. */ -extern jmp_buf g_jmp_buf; +extern jmp_buf wasm_rt_jmp_buf; #if WASM_RT_MEMCHECK_SIGNAL_HANDLER_POSIX #define WASM_RT_SETJMP(buf) sigsetjmp(buf, 1) @@ -35,7 +35,7 @@ extern jmp_buf g_jmp_buf; #define WASM_RT_SETJMP(buf) setjmp(buf) #define WASM_RT_LONGJMP(buf, val) longjmp(buf, val) /** Saved call stack depth that will be restored in case a trap occurs. */ -extern uint32_t g_saved_call_stack_depth; +extern uint32_t wasm_rt_saved_call_stack_depth; #endif /** @@ -55,11 +55,11 @@ extern uint32_t g_saved_call_stack_depth; * ``` */ #if WASM_RT_MEMCHECK_SIGNAL_HANDLER_POSIX -#define wasm_rt_impl_try() WASM_RT_SETJMP(g_jmp_buf) +#define wasm_rt_impl_try() WASM_RT_SETJMP(wasm_rt_jmp_buf) #else -#define wasm_rt_impl_try() \ - (g_saved_call_stack_depth = wasm_rt_call_stack_depth, \ - WASM_RT_SETJMP(g_jmp_buf)) +#define wasm_rt_impl_try() \ + (wasm_rt_saved_call_stack_depth = wasm_rt_call_stack_depth, \ + WASM_RT_SETJMP(wasm_rt_jmp_buf)) #endif #ifdef __cplusplus |