diff options
| author | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-08 20:39:50 +0900 |
|---|---|---|
| committer | Yukihiro "Matz" Matsumoto <[email protected]> | 2013-11-08 20:39:50 +0900 |
| commit | de790bdc2785ee36730563982afc45480f6c0f42 (patch) | |
| tree | efc81547c8a6190a00bbd0fce704a02c8e373c3a /include | |
| parent | cba07b02755711630e418fcf361d94cf47bb6730 (diff) | |
| download | mruby-de790bdc2785ee36730563982afc45480f6c0f42.tar.gz mruby-de790bdc2785ee36730563982afc45480f6c0f42.zip | |
allow irep to be GCed
Diffstat (limited to 'include')
| -rw-r--r-- | include/mruby/irep.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/mruby/irep.h b/include/mruby/irep.h index a31fef39c..8bcf7ce82 100644 --- a/include/mruby/irep.h +++ b/include/mruby/irep.h @@ -37,7 +37,7 @@ typedef struct mrb_irep { uint16_t *lines; struct mrb_irep_debug_info* debug_info; - size_t ilen, plen, slen, rlen; + size_t ilen, plen, slen, rlen, refcnt; } mrb_irep; #define MRB_ISEQ_NO_FREE 1 @@ -45,6 +45,8 @@ typedef struct mrb_irep { mrb_irep *mrb_add_irep(mrb_state *mrb); mrb_value mrb_load_irep(mrb_state*, const uint8_t*); void mrb_irep_free(mrb_state*, struct mrb_irep*); +void mrb_irep_incref(mrb_state*, struct mrb_irep*); +void mrb_irep_decref(mrb_state*, struct mrb_irep*); #if defined(__cplusplus) } /* extern "C" { */ |
