Skip to content

Commit 2893f52

Browse files
committed
refactor: removed pointless redefinition of rb_event_hook_func_t, because this type is already defined in the rb_sys crate
1 parent d621b0c commit 2893f52

File tree

1 file changed

+4
-7
lines changed
  • gems/codetracer-ruby-recorder/ext/native_tracer/src

1 file changed

+4
-7
lines changed

gems/codetracer-ruby-recorder/ext/native_tracer/src/lib.rs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@ use rb_sys::{
1313
rb_add_event_hook2, rb_cObject, rb_cRange, rb_cRegexp, rb_cStruct, rb_cTime,
1414
rb_check_typeddata, rb_const_defined, rb_const_get, rb_data_type_struct__bindgen_ty_1,
1515
rb_data_type_t, rb_data_typed_object_wrap, rb_define_alloc_func, rb_define_class,
16-
rb_define_method, rb_eIOError, rb_event_flag_t, rb_event_hook_flag_t, rb_funcall, rb_id2name,
17-
rb_id2sym, rb_intern, rb_method_boundp, rb_num2dbl, rb_num2long, rb_obj_classname,
18-
rb_obj_is_kind_of, rb_protect, rb_raise, rb_remove_event_hook_with_data, rb_sym2id,
19-
rb_trace_arg_t, rb_tracearg_binding, rb_tracearg_callee_id, rb_tracearg_event_flag,
16+
rb_define_method, rb_eIOError, rb_event_flag_t, rb_event_hook_flag_t, rb_event_hook_func_t,
17+
rb_funcall, rb_id2name, rb_id2sym, rb_intern, rb_method_boundp, rb_num2dbl, rb_num2long,
18+
rb_obj_classname, rb_obj_is_kind_of, rb_protect, rb_raise, rb_remove_event_hook_with_data,
19+
rb_sym2id, rb_trace_arg_t, rb_tracearg_binding, rb_tracearg_callee_id, rb_tracearg_event_flag,
2020
rb_tracearg_lineno, rb_tracearg_path, rb_tracearg_raised_exception, rb_tracearg_return_value,
2121
rb_tracearg_self, Qfalse, Qnil, Qtrue, ID, NIL_P, RARRAY_CONST_PTR, RARRAY_LEN,
2222
RB_FLOAT_TYPE_P, RB_INTEGER_TYPE_P, RB_SYMBOL_P, RB_TYPE_P, RSTRING_LEN, RSTRING_PTR,
@@ -28,9 +28,6 @@ use runtime_tracing::{
2828
ValueRecord,
2929
};
3030

31-
// Event hook function type from Ruby debug.h
32-
type rb_event_hook_func_t = Option<unsafe extern "C" fn(rb_event_flag_t, VALUE, VALUE, ID, VALUE)>;
33-
3431
struct InternedSymbols {
3532
to_s: ID,
3633
local_variables: ID,

0 commit comments

Comments
 (0)