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.760 2009/03/12 17:31:36 grubba Exp $ + || $Id: program.c,v 1.761 2009/04/22 17:17:55 grubba 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:6185:    /* Assume that if `==() throws an error, the svalues aren't equal. */    e = Pike_compiler->new_program->num_constants;    } else {    for(e=0;e<Pike_compiler->new_program->num_constants;e++)    {    struct program_constant *c = Pike_compiler->new_program->constants+e;       if (foo->type == c->sval.type) {    /* Make sure only to compare within the same basic type. */    if (foo->type == T_OBJECT) { -  /* Special case objects -- We don't want stange LFUN effects... */ +  /* Special case objects -- We don't want strange LFUN effects... */    if ((foo->u.object == c->sval.u.object) &&    (foo->subtype == c->sval.subtype)) {    UNSETJMP(jmp);    return e;    }    } else if (foo->type == T_INT) {    if (foo->u.integer == c->sval.u.integer) { -  if (foo->u.integer || (foo->subtype == c->sval.subtype)) { +  /* Make sure UNDEFINED is kept (but not in compat mode). */ +  if (foo->u.integer || (foo->subtype == c->sval.subtype) || +  TEST_COMPAT(7, 6)) {    UNSETJMP(jmp);    return e;    }    }    } else if(equal ? is_equal(& c->sval,foo) : is_eq(& c->sval,foo)) {    UNSETJMP(jmp);    return e;    }    }    }
pike.git/src/program.c:7000:   }      /* Main entry point for compiler messages originating from    * C-code.    *    * Sends the message along to PikeCompiler()->report().    *    * NOTE: The format string fmt (and vargs) is only formatted with    * string_builder_vsprintf() if the number of extra    * Pike stack arguments (args) is zero. +  * +  * NOTE: This function may be called from functions that sometimes +  * execute outside of the compilation context, eg by +  * __handle_sprintf_format(), which can be called directly +  * by Pike-code, in which case it is a NO-OP.    */   PMOD_EXPORT void va_yyreport(int severity_level,    struct pike_string *file, INT32 line,    struct pike_string *system, INT32 args,    const char *fmt, va_list vargs)   {    struct compilation *c = MAYBE_THIS_COMPILATION;    struct string_builder s;       if (!c) {