pike.git / src / operators.c

version» Context lines:

pike.git/src/operators.c:601:    default:    Pike_error("Cannot cast %s to float.\n",    get_name_of_type(TYPEOF(Pike_sp[-1])));    }       SET_SVAL(Pike_sp[-1], T_FLOAT, 0, float_number, f);    break;    }       case T_OBJECT: +  { +  struct program *p = program_from_type(type); +  if (p) { +  struct svalue s; +  SET_SVAL(s, T_PROGRAM, 0, program, p); +  apply_svalue(&s, 1); +  return; +  } +  }    switch(TYPEOF(Pike_sp[-1]))    {    case T_STRING: {    struct pike_string *file;    INT_TYPE lineno;    if(Pike_fp->pc &&    (file = low_get_line(Pike_fp->pc, Pike_fp->context->prog, &lineno))) {    push_string(file);    }else{    push_int(0);