Skip to content

Commit 5c1fed0

Browse files
Suppress js/ext warnings
1 parent b2370f6 commit 5c1fed0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/gems/js/ext/js/js-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -438,7 +438,7 @@ static VALUE _rb_js_import_from_js(VALUE obj) {
438438
* Returns +obj+ wrapped by JS class RbValue.
439439
*/
440440
static VALUE _rb_js_obj_wrap(VALUE obj, VALUE wrapping) {
441-
#if JS_ENABLE_COMPONENT_MODEL
441+
#ifdef JS_ENABLE_COMPONENT_MODEL
442442
rb_abi_stage_rb_value_to_js(wrapping);
443443
return jsvalue_s_new(rb_js_abi_host_rb_object_to_js_rb_value());
444444
#else
@@ -511,7 +511,7 @@ static VALUE _rb_js_false_to_js(VALUE obj) {
511511
* Returns +self+ as a JS::Object.
512512
*/
513513
static VALUE _rb_js_proc_to_js(VALUE obj) {
514-
#if JS_ENABLE_COMPONENT_MODEL
514+
#ifdef JS_ENABLE_COMPONENT_MODEL
515515
rb_abi_stage_rb_value_to_js(obj);
516516
return jsvalue_s_new(ruby_js_js_runtime_proc_to_js_function());
517517
#else

packages/gems/js/ext/js/witapi-core.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,6 +358,8 @@ bool rb_abi_guest_rb_set_should_prohibit_rewind(bool value) {
358358
return old;
359359
}
360360

361+
#ifdef JS_ENABLE_COMPONENT_MODEL
362+
361363
static VALUE rb_abi_export_stage = Qnil;
362364
static rb_abi_guest_own_rb_abi_value_t rb_abi_export_rb_value_to_js(void) {
363365
VALUE staged = rb_abi_export_stage;
@@ -372,8 +374,6 @@ void rb_abi_stage_rb_value_to_js(VALUE value) {
372374
rb_abi_export_stage = value;
373375
}
374376

375-
#ifdef JS_ENABLE_COMPONENT_MODEL
376-
377377
extern void __wasm_call_ctors(void);
378378
static inline void __wasm_call_ctors_if_needed(void) {
379379
static bool __wasm_call_ctors_done = false;

0 commit comments

Comments
 (0)