pike.git / src / builtin.cmod

version» Context lines:

pike.git/src/builtin.cmod:1:   /* -*- c -*- -  * $Id: builtin.cmod,v 1.40 2001/06/19 21:46:13 grubba Exp $ +  * $Id: builtin.cmod,v 1.41 2001/06/19 22:11:59 grubba Exp $    */      #include "global.h"   #include "interpret.h"   #include "svalue.h"   #include "opcodes.h"   #include "pike_macros.h"   #include "object.h"   #include "program.h"   #include "array.h"
pike.git/src/builtin.cmod:691:       PIKEFUN string _sprintf(int c, mapping|void opts)    {    pop_n_elems(args);       push_text("backtrace_frame(");    if (THIS->pc) {    if (!THIS->filename) {    THIS->filename =    make_shared_string(get_line(THIS->pc, THIS->prog, &THIS->lineno)); +  if (THIS->prog) { +  free_program(THIS->prog); +  THIS->prog = NULL;    } -  +  }    ref_push_string(THIS->filename);    push_text(":");    push_int(THIS->lineno);    push_text(", ");    f_add(4);    } else {    push_text("Unknown file, ");    }    if (THIS->fun.type == PIKE_T_FUNCTION) {    if (THIS->fun.u.object->prog) {
pike.git/src/builtin.cmod:785:    }       for (i = index; i <= end; i++) {    switch(i) {    case 0: /* Filename */    if (THIS->pc) {    if (!THIS->filename) {    THIS->filename =    make_shared_string(get_line(THIS->pc, THIS->prog,    &THIS->lineno)); +  if (THIS->prog) { +  free_program(THIS->prog); +  THIS->prog = NULL;    } -  +  }    ref_push_string(THIS->filename);    } else {    push_int(0);    }    break;    case 1: /* Linenumber */    if (THIS->pc) {    if (!THIS->filename) {    THIS->filename =    make_shared_string(get_line(THIS->pc, THIS->prog,    &THIS->lineno)); -  +  if (THIS->prog) { +  free_program(THIS->prog); +  THIS->prog = NULL;    } -  +  }    push_int(THIS->lineno);    } else {    push_int(0);    }    break;    case 2: /* Function */    push_svalue(&THIS->fun);    break;    default: /* Arguments */    {