pike.git / src / program.c

version» Context lines:

pike.git/src/program.c:1:   /*   || 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.505 2003/06/06 12:57:00 grubba Exp $ + || $Id: program.c,v 1.506 2003/06/06 14:31:11 grubba Exp $   */      #include "global.h" - RCSID("$Id: program.c,v 1.505 2003/06/06 12:57:00 grubba Exp $"); + RCSID("$Id: program.c,v 1.506 2003/06/06 14:31:11 grubba Exp $");   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "language.h"   #include "lex.h"   #include "pike_macros.h"   #include "fsort.h"
pike.git/src/program.c:4244:    free_svalue(&tmp);    return ret;   }      PMOD_EXPORT int add_program_constant(const char *name,    struct program *p,    INT32 flags)   {    INT32 ret;    struct svalue tmp; +  if (p) {    tmp.type=T_PROGRAM;    tmp.subtype=0;    tmp.u.program=p; -  +  } else { +  /* Probable compilation error in a C-module. */ +  tmp.type = T_INT; +  tmp.subtype = NUMBER_UNDEFINED; +  tmp.u.integer = 0; +  my_yyerror("Program constant \"%s\" is NULL.", name); +  }    ret=simple_add_constant(name, &tmp, flags);    return ret;   }      PMOD_EXPORT int add_object_constant(const char *name,    struct object *o,    INT32 flags)   {    INT32 ret;    struct svalue tmp;