Skip to content

Commit ffbdb30

Browse files
peterzhu2118ko1
authored andcommitted
Use rb_iseqw_to_iseq to get iseq pointer
Using DATA_PTR is internal implementation details so we should not use it.
1 parent 75326e2 commit ffbdb30

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ext/debug/debug.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ static VALUE rb_mDebugger;
88

99
// iseq
1010
typedef struct rb_iseq_struct rb_iseq_t;
11+
const rb_iseq_t *rb_iseqw_to_iseq(VALUE iseqw);
1112
VALUE rb_iseq_realpath(const rb_iseq_t *iseq);
1213

1314
static VALUE
1415
iseq_realpath(VALUE iseqw)
1516
{
16-
rb_iseq_t *iseq = DATA_PTR(iseqw);
17-
return rb_iseq_realpath(iseq);
17+
return rb_iseq_realpath(rb_iseqw_to_iseq(iseqw));
1818
}
1919

2020
static VALUE rb_cFrameInfo;

0 commit comments

Comments
 (0)