summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorSutou Kouhei <[email protected]>2020-03-04 09:40:18 +0900
committerSutou Kouhei <[email protected]>2020-03-04 18:35:40 +0900
commit96d727177e43aa5d476e5a0dfcace22407d9967c (patch)
treea709b8b7acdec4cccd57b3155848eae1a6ee010a /include
parentbe86bd3c49092ae3a120d453f0373ff2fbe48299 (diff)
downloadmruby-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')
-rw-r--r--include/mrbconf.h7
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. */