From 81f839ea0441f9bb89f9a94fba244276325905a9 Mon Sep 17 00:00:00 2001 From: Yuichi Nishiwaki Date: Sat, 1 Mar 2014 00:00:21 +0900 Subject: [PATCH] use yyget_extra function --- src/scan.l | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/scan.l b/src/scan.l index 39e8870f..6c0003e0 100644 --- a/src/scan.l +++ b/src/scan.l @@ -173,23 +173,20 @@ infnan "+inf.0"|"-inf.0"|"+nan.0"|"-nan.0" %% -#undef yyextra -#define yyextra ((struct yyguts_t *)yyscanner)->yyextra_r - void * yyalloc(size_t bytes, yyscan_t yyscanner) { - return pic_alloc(yyextra->pic, bytes); + return pic_alloc(yyget_extra(yyscanner)->pic, bytes); } void * yyrealloc(void *ptr, size_t bytes, yyscan_t yyscanner) { - return pic_realloc(yyextra->pic, ptr, bytes); + return pic_realloc(yyget_extra(yyscanner)->pic, ptr, bytes); } void yyfree(void * ptr, yyscan_t yyscanner) { - return pic_free(yyextra->pic, ptr); + return pic_free(yyget_extra(yyscanner)->pic, ptr); }