pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.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: operators.c,v 1.226 2008/01/26 22:34:22 mast Exp $ + || $Id: operators.c,v 1.227 2008/02/27 23:59:18 grubba Exp $   */      #include "global.h"   #include <math.h>   #include "interpret.h"   #include "svalue.h"   #include "multiset.h"   #include "mapping.h"   #include "array.h"   #include "stralloc.h"
pike.git/src/operators.c:608:    break;    }       case T_OBJECT:    switch(sp[-1].type)    {    case T_STRING: {    struct pike_string *file;    INT32 lineno;    if(Pike_fp->pc && -  (file = low_get_line(Pike_fp->pc, Pike_fp->context.prog, &lineno))) { +  (file = low_get_line(Pike_fp->pc, Pike_fp->context->prog, &lineno))) {    push_string(file);    }else{    push_int(0);    }    /* FIXME: Ought to allow compile_handler to override.    */    APPLY_MASTER("cast_to_object",2);    return;    }   
pike.git/src/operators.c:645:    }    break;       case T_PROGRAM:    switch(sp[-1].type)    {    case T_STRING: {    struct pike_string *file;    INT32 lineno;    if(Pike_fp->pc && -  (file = low_get_line(Pike_fp->pc, Pike_fp->context.prog, &lineno))) { +  (file = low_get_line(Pike_fp->pc, Pike_fp->context->prog, &lineno))) {    push_string(file);    }else{    push_int(0);    }    /* FIXME: Ought to allow compile_handler to override.    */    APPLY_MASTER("cast_to_program",2);    return;    }   
pike.git/src/operators.c:1024:    * for array, mapping and multiset, so we perform a more lenient    * check for them.    */    struct pike_type *sval_type = get_type_of_svalue(s);    struct pike_string *t1;    struct pike_string *t2;    char *fname = "__soft-cast";    ONERROR tmp1;    ONERROR tmp2;    -  if (Pike_fp->current_object && Pike_fp->context.prog && -  Pike_fp->current_object->prog) { +  if (Pike_fp->current_program) {    /* Look up the function-name */    struct pike_string *name = -  ID_FROM_INT(Pike_fp->current_object->prog, Pike_fp->fun)->name; +  ID_FROM_INT(Pike_fp->current_program, Pike_fp->fun)->name;    if ((!name->size_shift) && (name->len < 100))    fname = name->str;    }       t1 = describe_type(type);    SET_ONERROR(tmp1, do_free_string, t1);       t2 = describe_type(sval_type);    SET_ONERROR(tmp2, do_free_string, t2);