use yyrealloc

This commit is contained in:
Yuichi Nishiwaki 2014-03-01 00:20:19 +09:00
parent a51dc51a09
commit 3bedc65d2b
2 changed files with 2 additions and 2 deletions

View File

@ -145,7 +145,7 @@ void yyerror(struct parser_control *, const char *);
char c;
struct {
char *dat;
int len, capa;
size_t len, capa;
} blob;
pic_value datum;
}

View File

@ -164,7 +164,7 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0"
yylvalp->blob.dat[yylvalp->blob.len++] = (char)i;
if (yylvalp->blob.len > yylvalp->blob.capa) {
yylvalp->blob.capa *= 2;
yylvalp->blob.dat = realloc(yylvalp->blob.dat, yylvalp->blob.capa);
yylvalp->blob.dat = yyrealloc(yylvalp->blob.dat, yylvalp->blob.capa, yyscanner);
}
}
<BYTEVECTOR>")" {