Branch: Tag:

2001-07-13

2001-07-13 11:26:40 by Henrik Grubbström (Grubba) <grubba@grubba.org>

get_{program_,}line() now returns a pike_string.
store_linenumber() is now wide string safe.
Added some more debug to store_linenumber().
Fixes [bug 1866 (#1866)].

Rev: src/builtin.cmod:1.59
Rev: src/builtin_functions.c:1.394
Rev: src/gc.c:1.169
Rev: src/interpret.c:1.219
Rev: src/interpreter.h:1.68
Rev: src/object.c:1.179
Rev: src/opcodes.c:1.113
Rev: src/program.c:1.353
Rev: src/program.h:1.138

129: Inside #if defined(PIKE_DEBUG)
   if(t_flag > 2)    {    char *file, *f; +  struct pike_string *filep;    INT32 linep;    -  file = get_line(pc-1,Pike_fp->context.prog,&linep); -  while((f=STRCHR(file,'/'))) file=f+1; +  filep = get_line(pc-1,Pike_fp->context.prog,&linep); +  file = filep->str; +  while((f=STRCHR(file,'/'))) +  file=f+1;    fprintf(stderr,"- %s:%4ld:(%lx): %-25s %4ld %4ld\n",    file,(long)linep,    DO_NOT_WARN((long)(pc-Pike_fp->context.prog->program-1)),
143:   #endif /* HAVE_COMPUTED_GOTO */    DO_NOT_WARN((long)(Pike_sp-Pike_interpreter.evaluator_stack)),    DO_NOT_WARN((long)(Pike_mark_sp-Pike_interpreter.mark_stack))); +  free_string(filep);    }      #ifdef HAVE_COMPUTED_GOTO