summaryrefslogtreecommitdiffhomepage
path: root/src/parse.y
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2013-03-22 19:00:37 -0700
committerYukihiro "Matz" Matsumoto <[email protected]>2013-03-22 19:00:37 -0700
commitd04f6abb00051465f59be4cda54e593a64923f8e (patch)
treef9b8e242b2298bd8b34dd2ba60e24ac14cd946bc /src/parse.y
parenta7dc817add5542ec6806484a35cbc57e3ed10629 (diff)
parent4656073b600715b58dfde1e64fc481225cf667b2 (diff)
downloadmruby-d04f6abb00051465f59be4cda54e593a64923f8e.tar.gz
mruby-d04f6abb00051465f59be4cda54e593a64923f8e.zip
Merge pull request #1046 from monaka/pr-add-configuration-macro-MRB_PARSER_BUF_SIZE
Add configuration macro MRB_PARSER_BUF_SIZE.
Diffstat (limited to 'src/parse.y')
-rw-r--r--src/parse.y4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/parse.y b/src/parse.y
index 90a0eeb3b..7694644a9 100644
--- a/src/parse.y
+++ b/src/parse.y
@@ -3342,7 +3342,7 @@ newtok(parser_state *p)
static void
tokadd(parser_state *p, int c)
{
- if (p->bidx < 1024) {
+ if (p->bidx < MRB_PARSER_BUF_SIZE) {
p->buf[p->bidx++] = c;
}
}
@@ -3356,7 +3356,7 @@ toklast(parser_state *p)
static void
tokfix(parser_state *p)
{
- if (p->bidx >= 1024) {
+ if (p->bidx >= MRB_PARSER_BUF_SIZE) {
yyerror(p, "string too long (truncated)");
}
p->buf[p->bidx] = '\0';