diff options
| author | Sutou Kouhei <[email protected]> | 2020-03-04 09:40:18 +0900 |
|---|---|---|
| committer | Sutou Kouhei <[email protected]> | 2020-03-04 18:35:40 +0900 |
| commit | 96d727177e43aa5d476e5a0dfcace22407d9967c (patch) | |
| tree | a709b8b7acdec4cccd57b3155848eae1a6ee010a /include/mrbconf.h | |
| parent | be86bd3c49092ae3a120d453f0373ff2fbe48299 (diff) | |
| download | mruby-96d727177e43aa5d476e5a0dfcace22407d9967c.tar.gz mruby-96d727177e43aa5d476e5a0dfcace22407d9967c.zip | |
Enable MRB_METHOD_T_STRUCT by default on 32bit Windows
Because we can't use the highest 2 bits of function pointers.
Diffstat (limited to 'include/mrbconf.h')
| -rw-r--r-- | include/mrbconf.h | 7 |
1 files changed, 6 insertions, 1 deletions
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. */ |
