summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-11-29 14:50:22 +0900
committerGitHub <[email protected]>2020-11-29 14:50:22 +0900
commitc6071335a14668bc8f0256739bc74d4a547a38cf (patch)
treecde11dde7763c0c4b0dae7a5496165b6854b43cb /include
parent6d07d9b3d7a64834bda8644ab6c4ed1fabe217a4 (diff)
parentb0cea30f3293d0d4d00fee6f8c7a461e64028890 (diff)
downloadmruby-c6071335a14668bc8f0256739bc74d4a547a38cf.tar.gz
mruby-c6071335a14668bc8f0256739bc74d4a547a38cf.zip
Merge pull request #5200 from dearblue/catchhandler32
Change the catch handler address to 32 bits
Diffstat (limited to 'include')
-rw-r--r--include/mruby/irep.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/include/mruby/irep.h b/include/mruby/irep.h
index 04ab54ee2..12d81d0d3 100644
--- a/include/mruby/irep.h
+++ b/include/mruby/irep.h
@@ -47,9 +47,9 @@ enum mrb_catch_type {
struct mrb_irep_catch_handler {
uint8_t type; /* enum mrb_catch_type */
- uint8_t begin[2]; /* The starting address to match the hander. Includes this. */
- uint8_t end[2]; /* The endpoint address that matches the hander. Not Includes this. */
- uint8_t target[2]; /* The address to jump to if a match is made. */
+ uint8_t begin[4]; /* The starting address to match the hander. Includes this. */
+ uint8_t end[4]; /* The endpoint address that matches the hander. Not Includes this. */
+ uint8_t target[4]; /* The address to jump to if a match is made. */
};
/* Program data array struct */
@@ -139,6 +139,9 @@ mrb_irep_catch_handler_table(const struct mrb_irep *irep)
}
}
+#define mrb_irep_catch_handler_pack(n, v) uint32_to_bin(n, v)
+#define mrb_irep_catch_handler_unpack(v) bin_to_uint32(v)
+
MRB_END_DECL
#endif /* MRUBY_IREP_H */