Branch: Tag:

1996-11-26

1996-11-26 20:50:15 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

object_program now accepts any type

Rev: src/builtin_functions.c:1.11

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.10 1996/11/14 01:24:07 hubbe Exp $"); + RCSID("$Id: builtin_functions.c,v 1.11 1996/11/26 20:50:15 hubbe Exp $");   #include "interpret.h"   #include "svalue.h"   #include "macros.h"
835:    if(args < 1)    error("Too few argumenets to object_program()\n");    -  if(sp[-args].type != T_OBJECT) -  error("Bad argument 1 to object_program()\n"); -  +  if(sp[-args].type == T_OBJECT)    p=sp[-args].u.object->prog; -  +  else +  p=0; +     pop_n_elems(args);       if(!p)