pike.git/
src/
language.yacc
Branch:
Tag:
Non-build tags
All tags
No tags
1998-04-17
1998-04-17 17:13:37 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>
e73daeecc59cd491e3836f4ebc26fb77db433d3d (
6
lines) (+
5
/-
1
)
[
Show
|
Annotate
]
Branch:
7.9
'freeing string twice' bug fixed
Rev: src/language.yacc:1.82
171:
/* This is the grammar definition of Pike. */ #include "global.h"
-
RCSID("$Id: language.yacc,v 1.
81
1998/04/17
03
:
18
:
09
grubba
Exp $");
+
RCSID("$Id: language.yacc,v 1.
82
1998/04/17
17
:
13
:
37
hubbe
Exp $");
#ifdef HAVE_MEMORY_H #include <memory.h> #endif
940:
new_local_name2: F_IDENTIFIER {
+
add_ref($<n>0->u.sval.u.string);
add_local_name($1->u.sval.u.string, $<n>0->u.sval.u.string); $$=mknode(F_ASSIGN,mkintnode(0),mklocalnode(islocal($1->u.sval.u.string))); free_node($1);
947:
| bad_identifier { $$=mkintnode(0); } | F_IDENTIFIER '=' safe_expr0 {
+
add_ref($<n>0->u.sval.u.string);
add_local_name($1->u.sval.u.string, $<n>0->u.sval.u.string); $$=mknode(F_ASSIGN,$3, mklocalnode(islocal($1->u.sval.u.string))); free_node($1);
1849:
} /* argument must be a shared string */
+
/* Note that this function eats a reference to 'type' */
void add_local_name(struct pike_string *str, struct pike_string *type) {