Branch: Tag:

1997-10-03

1997-10-03 02:25:38 by Fredrik Hübinette (Hubbe) <hubbe@hubbe.net>

cyclic -> now fixed

Rev: src/Makefile.in:1.36
Rev: src/array.c:1.15
Rev: src/array.h:1.5
Rev: src/builtin_functions.c:1.46
Rev: src/cyclic.c:1.1
Rev: src/cyclic.h:1.1
Rev: src/testsuite.in:1.56
Rev: src/threads.h:1.17

4:   ||| See the files COPYING and DISCLAIMER for more information.   \*/   #include "global.h" - RCSID("$Id: builtin_functions.c,v 1.45 1997/09/11 02:13:10 hubbe Exp $"); + RCSID("$Id: builtin_functions.c,v 1.46 1997/10/03 02:25:35 hubbe Exp $");   #include "interpret.h"   #include "svalue.h"   #include "pike_macros.h"
35:   #include "module_support.h"   #include "module.h"   #include "opcodes.h" + #include "cyclic.h"      #ifdef HAVE_CRYPT_H   #include <crypt.h>
1294:   {    INT32 e;    struct array *a,*tmp; +  DECLARE_CYCLIC();       if(args < 2)    error("Too few arguments to column().\n");
1302:    error("Bad argument 1 to column().\n");       tmp=sp[-args].u.array; +  if((a=(struct array *)BEGIN_CYCLIC(tmp,0))) +  { +  a->refs++; +  pop_n_elems(args); +  push_array(a); +  }else{    push_array(a=allocate_array(tmp->size)); -  +  SET_CYCLIC_RET(a);       for(e=0;e<a->size;e++)    index_no_free(ITEM(a)+e, ITEM(tmp)+e, sp-args);    -  +  END_CYCLIC();    a->refs++;    pop_n_elems(args+1);    push_array(a);    } -  + }      #ifdef DEBUG   void f__verify_internals(INT32 args)