Branch: Tag:

2003-09-30

2003-09-30 13:32:58 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Backported define_function() fix from Pike 7.5.

Rev: src/program.c:1.480

2:   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: program.c,v 1.479 2003/09/09 08:22:05 mast Exp $ + || $Id: program.c,v 1.480 2003/09/30 13:32:58 grubba Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.479 2003/09/09 08:22:05 mast Exp $"); + RCSID("$Id: program.c,v 1.480 2003/09/30 13:32:58 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"
4213:   #endif    return overridden;    } -  } +  } else {   make_a_new_def:      #ifdef PIKE_DEBUG
4221:    Pike_fatal("Internal error: Not allowed to add more identifiers during second compiler pass.\n");   #endif    -  /* define a new function */ +  /* Define a new function */       copy_shared_string(fun.name, name);    copy_pike_type(fun.type, type);
4254:    ref.id_flags = flags;    ref.identifier_offset = i;    ref.inherit_offset = 0; +  }       i=Pike_compiler->new_program->num_identifier_references;    add_to_identifier_references(ref);