From 96d727177e43aa5d476e5a0dfcace22407d9967c Mon Sep 17 00:00:00 2001 From: Sutou Kouhei Date: Wed, 4 Mar 2020 09:40:18 +0900 Subject: Enable MRB_METHOD_T_STRUCT by default on 32bit Windows Because we can't use the highest 2 bits of function pointers. --- include/mrbconf.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/mrbconf.h b/include/mrbconf.h index 3a574c7d2..35762a8f0 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -38,7 +38,12 @@ /* add -DMRB_METHOD_T_STRUCT on machines that use higher bits of pointers */ /* no MRB_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */ -//#define MRB_METHOD_T_STRUCT +#ifndef MRB_METHOD_T_STRUCT + // can't use highest 2 bits of function pointers on 32bit Windows. +# if defined(_WIN32) && !defined(_WIN64) +# define MRB_METHOD_T_STRUCT +# endif +#endif /* add -DMRB_INT32 to use 32bit integer for mrb_int; conflict with MRB_INT64; Default for 32-bit CPU mode. */ -- cgit v1.2.3