Branch: Tag:

2002-03-25

2002-03-25 22:39:07 by Martin Nilsson <mani@lysator.liu.se>

Added _sizeof

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

1:   #pike __REAL_VERSION__    - // $Id: Stack.pike,v 1.5 2002/03/20 16:39:52 nilsson Exp $ + // $Id: Stack.pike,v 1.6 2002/03/25 22:39:07 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
23:      //! Returns the top element from the stack, without   //! popping it. + //! @throws + //! Throws an error if called on an empty stack.   mixed top()   {    if (ptr) {
99:   {    arr = allocate(initial_size || 32);   } +  + //! + int _sizeof() { +  return ptr; + }