Branch: Tag:

2002-06-14

2002-06-14 00:56:33 by Martin Nilsson <mani@lysator.liu.se>

Use this_program instead of explicitly naming it ADT.Stack.

Rev: lib/modules/ADT.pmod/Stack.pike:1.8

1:   #pike __REAL_VERSION__    - // $Id: Stack.pike,v 1.7 2002/03/26 11:40:18 nilsson Exp $ + // $Id: Stack.pike,v 1.8 2002/06/14 00:56:33 nilsson Exp $      //! This class implements a simple stack. Instead of adding and removing   //! elements to an array, and thus making it vary in size for every push
123:   //! A stack added with another stack yields a third   //! a third stack will all the stack elements from   //! the two first stacks. - ADT.Stack `+(ADT.Stack s) { + this_program `+(this_program s) {    array elem = arr[..ptr-1]+values(s); -  ADT.Stack ns = ADT.Stack(1); +  this_program ns = this_program(1);    ns->set_stack(elem);    return ns;   }