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.774 2010/02/08 17:40:10 grubba Exp $ + || $Id: program.c,v 1.775 2010/02/18 08:52:54 srb Exp $   */      #include "global.h"   #include "program.h"   #include "object.h"   #include "dynamic_buffer.h"   #include "pike_types.h"   #include "stralloc.h"   #include "las.h"   #include "lex.h"
pike.git/src/program.c:5207:    name_s = make_shared_string(name);    type_s = parse_type(type);       ret=define_variable(name_s, type_s, flags);    free_string(name_s);    free_type(type_s);    return ret;   }      PMOD_EXPORT int add_constant(struct pike_string *name, -  struct svalue *c, +  const struct svalue *c,    INT32 flags)   {    int n;    struct compilation *cc = THIS_COMPILATION;    struct identifier dummy;    struct reference ref;      #ifdef PROGRAM_BUILD_DEBUG    {    if (c) {
pike.git/src/program.c:6313:    for (i=0;i<Pike_compiler->new_program->num_strings;i++)    if (Pike_compiler->new_program->strings[i] == str)    return i;       reference_shared_string(str);    add_to_strings(str);    return i;   }      /* NOTE: O(n²)! */ - int store_constant(struct svalue *foo, + int store_constant(const struct svalue *foo,    int equal,    struct pike_string *constant_name)   {    struct program_constant tmp;    volatile unsigned int e;       JMP_BUF jmp;    if (SETJMP(jmp)) {    handle_compile_exception ("Error comparing constants.");    /* Assume that if `==() throws an error, the svalues aren't equal. */