summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authordearblue <[email protected]>2019-04-26 21:28:57 +0900
committerdearblue <[email protected]>2019-04-26 21:28:57 +0900
commit302ad847a35f6bf3395ff8605c2007dc9698cea5 (patch)
treed50f95ffa401fed747251764d765a75ae6aa89ea
parentc078758644443fdac6f91867e00abb152f670599 (diff)
downloadmruby-302ad847a35f6bf3395ff8605c2007dc9698cea5.tar.gz
mruby-302ad847a35f6bf3395ff8605c2007dc9698cea5.zip
Add customized `mrb_ro_data_p()`
User definable `mrb_ro_data_p()` functions are available by defining `MRB_USE_CUSTOM_RO_DATA_P`. (Limitation) It can not be defined as an inline function.
-rw-r--r--include/mruby/value.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/include/mruby/value.h b/include/mruby/value.h
index 6838daaa5..be3dd397f 100644
--- a/include/mruby/value.h
+++ b/include/mruby/value.h
@@ -278,7 +278,10 @@ mrb_undef_value(void)
return v;
}
-#ifdef MRB_USE_ETEXT_EDATA
+#if defined(MRB_USE_CUSTOM_RO_DATA_P)
+/* If you define `MRB_USE_CUSTOM_RO_DATA_P`, you must implement `mrb_ro_data_p()`. */
+mrb_bool mrb_ro_data_p(const char *p);
+#elif defined(MRB_USE_ETEXT_EDATA)
#if (defined(__APPLE__) && defined(__MACH__))
#include <mach-o/getsect.h>
static inline mrb_bool