summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorMitchell Blank Jr <[email protected]>2012-05-22 01:02:49 -0700
committerMitchell Blank Jr <[email protected]>2012-05-22 01:02:49 -0700
commit8c084b9645ddc376403aa6c32a3e703ecc28d400 (patch)
treeb536f3461a87f8e5044aff0c4b4035410065215a /src/parse.y
parentdd5dd821aa17668ac9184a3d554b9309c7d7c041 (diff)
parentabacbf667241ff4919b14007ef1a704f321de96d (diff)
downloadmruby-8c084b9645ddc376403aa6c32a3e703ecc28d400.tar.gz
mruby-8c084b9645ddc376403aa6c32a3e703ecc28d400.zip
Merge remote-tracking branch 'upstream/master'
Conflicts: src/time.c
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/parse.y b/src/parse.y
index e9348e7a1..871842668 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -10,6 +10,12 @@
#define YYDEBUG 1
#define YYERROR_VERBOSE 1
+/*
+ * Force yacc to use our memory management. This is a little evil because
+ * the macros assume that "parser_state *p" is in scope
+ */
+#define YYMALLOC(n) mrb_malloc(p->mrb, (n))
+#define YYFREE(o) mrb_free(p->mrb, (o))
#define YYSTACK_USE_ALLOCA 0
#include "mruby.h"