pike.git / src / modules / _Stdio / stat.c

version» Context lines:

pike.git/src/modules/_Stdio/stat.c:784:       stack_swap();    pop_stack();   }      static void stat_indices(INT32 args);   static void stat_values(INT32 args);      static void stat_cast(INT32 args)   { -  struct pike_string *type = Pike_sp[-args].u.string; +  struct pike_string *type; +  +  if (!args) +  SIMPLE_TOO_FEW_ARGS_ERROR("Stat cast",1); +  if (TYPEOF(sp[-args]) != T_STRING) +  SIMPLE_BAD_ARG_ERROR("cast",1,"string"); +  +  type = Pike_sp[-args].u.string;    pop_stack(); /* type have at least one more reference. */       if (type == literal_array_string)    {    push_int(0);    push_int(6);    stat_index(2);    }    else if (type == literal_mapping_string)    {