Skip to content

Commit 1493d11

Browse files
committed
ZJIT: Avoid using unexported types in zjit.h
`enum ruby_vminsn_type` is declared in `insns.inc` and is not exported. Using it in `zjit.h` would cause build errors when the file including it doesn't include `insns.inc`.
1 parent 4d464df commit 1493d11

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

zjit.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ extern bool rb_zjit_enabled_p;
1414
extern uint64_t rb_zjit_call_threshold;
1515
extern uint64_t rb_zjit_profile_threshold;
1616
void rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit_exception);
17-
void rb_zjit_profile_insn(enum ruby_vminsn_type insn, rb_execution_context_t *ec);
17+
void rb_zjit_profile_insn(int insn, rb_execution_context_t *ec);
1818
void rb_zjit_profile_enable(const rb_iseq_t *iseq);
1919
void rb_zjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop);
2020
void rb_zjit_cme_invalidate(const rb_callable_method_entry_t *cme);
@@ -26,7 +26,7 @@ void rb_zjit_before_ractor_spawn(void);
2626
#else
2727
#define rb_zjit_enabled_p false
2828
static inline void rb_zjit_compile_iseq(const rb_iseq_t *iseq, rb_execution_context_t *ec, bool jit_exception) {}
29-
static inline void rb_zjit_profile_insn(enum ruby_vminsn_type insn, rb_execution_context_t *ec) {}
29+
static inline void rb_zjit_profile_insn(int insn, rb_execution_context_t *ec) {}
3030
static inline void rb_zjit_profile_enable(const rb_iseq_t *iseq) {}
3131
static inline void rb_zjit_bop_redefined(int redefined_flag, enum ruby_basic_operators bop) {}
3232
static inline void rb_zjit_cme_invalidate(const rb_callable_method_entry_t *cme) {}

0 commit comments

Comments
 (0)