pike.git / src / las.c

version» Context lines:

pike.git/src/las.c:1:   /*\   ||| This file a part of Pike, and is copyright by Fredrik Hubinette   ||| Pike is distributed as GPL (General Public License)   ||| See the files COPYING and DISCLAIMER for more information.   \*/   /**/   #include "global.h" - RCSID("$Id: las.c,v 1.90 1999/09/19 21:11:47 grubba Exp $"); + RCSID("$Id: las.c,v 1.91 1999/09/19 22:59:44 hubbe Exp $");      #include "language.h"   #include "interpret.h"   #include "las.h"   #include "array.h"   #include "object.h"   #include "stralloc.h"   #include "dynamic_buffer.h"   #include "lex.h"   #include "pike_types.h"
pike.git/src/las.c:1030:    break;       case 0:    b=mknode(n->token, CAR(n), CDR(n));    }    if(n->type)    copy_shared_string(b->type, n->type);    else    b->type=0;    } -  if(n->name) add_ref(b->name=n->name); +  if(n->name) +  { +  if(b->name) free_string(b->name); +  add_ref(b->name=n->name); +  }    b->line_number = n->line_number;    b->node_info = n->node_info;    b->tree_info = n->tree_info;    return b;   }         int is_const(node *n)   {    if(!n) return 1;