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.161 2000/02/09 18:52:11 hubbe Exp $"); + RCSID("$Id: las.c,v 1.162 2000/02/09 23:49:16 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:1090:       i=ID_FROM_INT(p, numid);       /* Warning:    * This code doesn't produce function pointers for class constants,    * which can be harmful...    * /Hubbe    */    if(IDENTIFIER_IS_CONSTANT(i->identifier_flags))    { +  if(i->func.offset != -1) +  {    push_svalue(&PROG_FROM_INT(p, numid)->constants[i->func.offset].sval);    }else{ -  +  if(compiler_pass!=1) +  yyerror("Constant is not defined yet."); +  push_int(0); +  } +  }else{    my_yyerror("Identifier '%s' is not a constant", i->name->str);    push_int(0);    }    }   }      /* Leaves a function or object on the stack */   void resolv_class(node *n)   {    check_tree(n,0);