Skip to content

Commit

Permalink
Use rb_iseqw_to_iseq to get iseq pointer
Browse files Browse the repository at this point in the history
Using DATA_PTR is internal implementation details so we should not use it.
  • Loading branch information
peterzhu2118 authored and ko1 committed Mar 29, 2024
1 parent 75326e2 commit ffbdb30
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/debug/debug.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ static VALUE rb_mDebugger;

// iseq
typedef struct rb_iseq_struct rb_iseq_t;
const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
VALUE rb_iseq_realpath(const rb_iseq_t *iseq);

static VALUE
iseq_realpath(VALUE iseqw)
{
rb_iseq_t *iseq = DATA_PTR(iseqw);
return rb_iseq_realpath(iseq);
return rb_iseq_realpath(rb_iseqw_to_iseq(iseqw));
}

static VALUE rb_cFrameInfo;
Expand Down

0 comments on commit ffbdb30

Please sign in to comment.