value.h: fixed warnings on __APPLE__.

This commit is contained in:
Yukihiro "Matz" Matsumoto
2021-08-19 13:08:39 +09:00
parent 959383df75
commit 6f305c01a2
+2 -2
View File
@@ -428,11 +428,11 @@ mrb_ro_data_p(const char *p)
return __ehdr_start < p && p < __init_array_start;
}
#elif defined(__APPLE__)
#include <mach-o/getsect.h>;
#include <mach-o/getsect.h>
static inline mrb_bool
mrb_ro_data_p(const char *p)
{
return (void*)get_edata() < p && p < (void*)get_end();
return (char*)get_edata() < p && p < (char*)get_end();
}
#else
# define mrb_ro_data_p(p) FALSE