Skip to content

Commit

Permalink
Suppress js/ext warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kateinoigakukun committed Jun 15, 2024
1 parent b2370f6 commit 5c1fed0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/gems/js/ext/js/js-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,7 +438,7 @@ static VALUE _rb_js_import_from_js(VALUE obj) {
* Returns +obj+ wrapped by JS class RbValue.
*/
static VALUE _rb_js_obj_wrap(VALUE obj, VALUE wrapping) {
#if JS_ENABLE_COMPONENT_MODEL
#ifdef JS_ENABLE_COMPONENT_MODEL
rb_abi_stage_rb_value_to_js(wrapping);
return jsvalue_s_new(rb_js_abi_host_rb_object_to_js_rb_value());
#else
Expand Down Expand Up @@ -511,7 +511,7 @@ static VALUE _rb_js_false_to_js(VALUE obj) {
* Returns +self+ as a JS::Object.
*/
static VALUE _rb_js_proc_to_js(VALUE obj) {
#if JS_ENABLE_COMPONENT_MODEL
#ifdef JS_ENABLE_COMPONENT_MODEL
rb_abi_stage_rb_value_to_js(obj);
return jsvalue_s_new(ruby_js_js_runtime_proc_to_js_function());
#else
Expand Down
4 changes: 2 additions & 2 deletions packages/gems/js/ext/js/witapi-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -358,6 +358,8 @@ bool rb_abi_guest_rb_set_should_prohibit_rewind(bool value) {
return old;
}

#ifdef JS_ENABLE_COMPONENT_MODEL

static VALUE rb_abi_export_stage = Qnil;
static rb_abi_guest_own_rb_abi_value_t rb_abi_export_rb_value_to_js(void) {
VALUE staged = rb_abi_export_stage;
Expand All @@ -372,8 +374,6 @@ void rb_abi_stage_rb_value_to_js(VALUE value) {
rb_abi_export_stage = value;
}

#ifdef JS_ENABLE_COMPONENT_MODEL

extern void __wasm_call_ctors(void);
static inline void __wasm_call_ctors_if_needed(void) {
static bool __wasm_call_ctors_done = false;
Expand Down

0 comments on commit 5c1fed0

Please sign in to comment.