use yyrealloc
This commit is contained in:
parent
a51dc51a09
commit
3bedc65d2b
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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>")" {
|
||||
|
|
Loading…
Reference in New Issue