summaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-03-04 21:25:10 +0900
committerGitHub <[email protected]>2020-03-04 21:25:10 +0900
commit7905431fe98b7f075033657aff15982d7e4613e6 (patch)
treea709b8b7acdec4cccd57b3155848eae1a6ee010a /include
parentbe86bd3c49092ae3a120d453f0373ff2fbe48299 (diff)
parent96d727177e43aa5d476e5a0dfcace22407d9967c (diff)
downloadmruby-7905431fe98b7f075033657aff15982d7e4613e6.tar.gz
mruby-7905431fe98b7f075033657aff15982d7e4613e6.zip
Merge pull request #4948 from kou/32bit-windows-method-t-struct
Enable MRB_METHOD_T_STRUCT by default on 32bit Windows
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. */