Branch: Tag:

2000-09-30

2000-09-30 13:42:41 by Henrik Grubbström (Grubba) <grubba@grubba.org>

next_object() now handles the case where first_object is destructed.

Rev: src/builtin_functions.c:1.313

5:   \*/   /**/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.312 2000/09/26 00:17:44 hubbe Exp $"); + RCSID("$Id: builtin_functions.c,v 1.313 2000/09/30 13:42:41 grubba Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
2044:    struct object *o;    if(args < 1)    { -  o=first_object; +  o = first_object;    }else{    if(Pike_sp[-args].type != T_OBJECT)    SIMPLE_BAD_ARG_ERROR("next_object", 1, "object"); -  o=Pike_sp[-args].u.object->next; -  while(o && !o->prog) o=o->next; +  o = Pike_sp[-args].u.object->next;    } -  +  while(o && !o->prog) o=o->next;    pop_n_elems(args);    if(!o)    {