* data/yacc.c (malloc, free) [defined __cplusplus]: Wrap inside extern "C" {}.

This commit is contained in:
Paul Eggert
2005-06-09 20:44:28 +00:00
parent 43d3b66471
commit 0925ebb4fa
4 changed files with 23 additions and 5 deletions

View File

@@ -327,6 +327,9 @@ typedef struct YYLTYPE
# ifndef YYSTACK_ALLOC_MAXIMUM
# define YYSTACK_ALLOC_MAXIMUM ((YYSIZE_T) -1)
# endif
# ifdef __cplusplus
extern "C" {
# endif
# ifndef YYMALLOC
# define YYMALLOC malloc
# if (! defined (malloc) && ! defined (YYINCLUDED_STDLIB_H) \
@@ -341,6 +344,9 @@ void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */
void free (void *); /* INFRINGES ON USER NAME SPACE */
# endif
# endif
# ifdef __cplusplus
}
# endif
# endif
#endif /* ! defined (yyoverflow) || YYERROR_VERBOSE */
@@ -1165,8 +1171,8 @@ YYLTYPE yylloc;
yylloc.start.line = yylloc.end.line = 1;
yylloc.start.column = yylloc.end.column = 0;
}
/* Line 863 of yacc.c. */
#line 1170 "parse-gram.c"
/* Line 869 of yacc.c. */
#line 1176 "parse-gram.c"
yyvsp[0] = yylval;
yylsp[0] = yylloc;
@@ -1750,8 +1756,8 @@ yyreduce:
default: break;
}
/* Line 1059 of yacc.c. */
#line 1755 "parse-gram.c"
/* Line 1065 of yacc.c. */
#line 1761 "parse-gram.c"
yyvsp -= yylen;
yyssp -= yylen;

View File

@@ -143,7 +143,7 @@ typedef union YYSTYPE {
assoc assoc;
uniqstr uniqstr;
} YYSTYPE;
/* Line 1382 of yacc.c. */
/* Line 1388 of yacc.c. */
#line 148 "parse-gram.h"
# define yystype YYSTYPE /* obsolescent; will be withdrawn */
# define YYSTYPE_IS_DECLARED 1