diff options
Diffstat (limited to 'iseq.c')
-rw-r--r-- | iseq.c | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -427,11 +427,22 @@ rb_iseq_memsize(const rb_iseq_t *iseq) return size; } +static unsigned long fresh_iseq_unique_id = 0; /* -- Remove In 3.0 -- */ + +struct rb_iseq_constant_body * +rb_iseq_constant_body_alloc(void) +{ + struct rb_iseq_constant_body *iseq_body; + iseq_body = ZALLOC(struct rb_iseq_constant_body); + iseq_body->iseq_unique_id = fresh_iseq_unique_id++; /* -- Remove In 3.0 -- */ + return iseq_body; +} + static rb_iseq_t * iseq_alloc(void) { rb_iseq_t *iseq = iseq_imemo_alloc(); - iseq->body = ZALLOC(struct rb_iseq_constant_body); + iseq->body = rb_iseq_constant_body_alloc(); return iseq; } |