summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-11-08 20:39:50 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2013-11-08 20:39:50 +0900
commitde790bdc2785ee36730563982afc45480f6c0f42 (patch)
treeefc81547c8a6190a00bbd0fce704a02c8e373c3a /include
parentcba07b02755711630e418fcf361d94cf47bb6730 (diff)
downloadmruby-de790bdc2785ee36730563982afc45480f6c0f42.tar.gz
mruby-de790bdc2785ee36730563982afc45480f6c0f42.zip
allow irep to be GCed
Diffstat (limited to 'include')
-rw-r--r--include/mruby/irep.h4
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" { */