summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--vm_method.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index ae7b259..d346ba0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Fri Dec 20 17:52:50 2013 Koichi Sasada <ko1@atdot.net>
+
+ * vm_method.c: check definition of
+ GLOBAL_METHOD_CACHE_SIZE and GLOBAL_METHOD_CACHE_MASK.
+
Fri Dec 20 17:03:10 2013 Koichi Sasada <ko1@atdot.net>
* include/ruby/ruby.h: rename OBJ_WRITE and OBJ_WRITTEN into
diff --git a/vm_method.c b/vm_method.c
index 737cd26..fce8add 100644
--- a/vm_method.c
+++ b/vm_method.c
@@ -2,8 +2,13 @@
* This file is included by vm.c
*/
+#ifndef GLOBAL_METHOD_CACHE_SIZE
#define GLOBAL_METHOD_CACHE_SIZE 0x800
+#endif
+#ifndef GLOBAL_METHOD_CACHE_MASK
#define GLOBAL_METHOD_CACHE_MASK 0x7ff
+#endif
+
#define GLOBAL_METHOD_CACHE_KEY(c,m) ((((c)>>3)^(m))&GLOBAL_METHOD_CACHE_MASK)
#define GLOBAL_METHOD_CACHE(c,m) (global_method_cache + GLOBAL_METHOD_CACHE_KEY(c,m))
#include "method.h"