Branch: Tag:

1998-06-07

1998-06-07 19:44:46 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Support for program_from_svalue() in f_values() and f_indices().

Rev: src/builtin_functions.c:1.113

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.112 1998/05/25 15:23:25 grubba Exp $"); + RCSID("$Id: builtin_functions.c,v 1.113 1998/06/07 19:44:46 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
822:    a = program_indices(sp[-args].u.program);    break;    +  case T_FUNCTION: +  { +  struct program *p = program_from_svalue(sp-args); +  if (p) { +  a = program_indices(p); +  break; +  } +  } +  /* FALL THROUGH */ +     default:    PIKE_ERROR("indices", "Bad argument 1.\n", sp, args);    return; /* make apcc happy */
877:    a = program_values(sp[-args].u.program);    break;    +  case T_FUNCTION: +  { +  struct program *p = program_from_svalue(sp - args); +  if (p) { +  a = program_values(p); +  break; +  } +  } +  /* FALL THROUGH */ +     default:    PIKE_ERROR("values", "Bad argument 1.\n", sp, args);    return; /* make apcc happy */