diff --git a/src/builtin_functions.c b/src/builtin_functions.c index a6eb9e388db1a330667d203fd3191bf54f4709fd..6d92d65258a0b6551e8597cddf44617565c15857 100644 --- a/src/builtin_functions.c +++ b/src/builtin_functions.c @@ -2,11 +2,11 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: builtin_functions.c,v 1.487 2003/04/27 17:41:20 mast Exp $ +|| $Id: builtin_functions.c,v 1.488 2003/04/27 17:52:41 mast Exp $ */ #include "global.h" -RCSID("$Id: builtin_functions.c,v 1.487 2003/04/27 17:41:20 mast Exp $"); +RCSID("$Id: builtin_functions.c,v 1.488 2003/04/27 17:52:41 mast Exp $"); #include "interpret.h" #include "svalue.h" #include "pike_macros.h" @@ -6779,7 +6779,7 @@ PMOD_EXPORT void f_map(INT32 args) dmalloc_touch_svalue(Pike_sp); push_array_items(Pike_sp->u.array); f_map(splice+2); /* ... arr fun extra -> ... retval */ - stack_pop_n_elems_keep_top(2); /* arr fun extra ret -> arr retval */ + stack_pop_2_elems_keep_top(); /* arr fun extra ret -> arr retval */ stack_swap(); /* retval arr */ f_indices(1); /* retval retind */ stack_swap(); /* retind retval */ @@ -7178,7 +7178,7 @@ PMOD_EXPORT void f_filter(INT32 args) k++; } if (k > 1) f_add(k); - stack_pop_n_elems_keep_top(2); + stack_pop_2_elems_keep_top(); return; case T_MAPPING: diff --git a/src/interpret_functions.h b/src/interpret_functions.h index 4fd863f70e3f4dacfd67951d94fbe6e37f0b101b..b925f2ca862a37a97f8aa7f14f2846af3497910b 100644 --- a/src/interpret_functions.h +++ b/src/interpret_functions.h @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: interpret_functions.h,v 1.149 2003/04/18 15:49:46 mast Exp $ +|| $Id: interpret_functions.h,v 1.150 2003/04/27 17:52:42 mast Exp $ */ /* @@ -725,13 +725,13 @@ OPCODE0(F_ADD_TO, "+=", 0, { * no need to reassign it. */ pop_stack(); - stack_pop_n_elems_keep_top(2); + stack_pop_2_elems_keep_top(); goto add_to_done; } } f_add(2); assign_lvalue(Pike_sp-3,Pike_sp-1); - stack_pop_n_elems_keep_top(2); + stack_pop_2_elems_keep_top(); add_to_done: ; /* make gcc happy */ }); @@ -813,7 +813,7 @@ OPCODE0(F_INC, "++x", 0, { push_int(1); f_add(2); assign_lvalue(Pike_sp-3, Pike_sp-1); - stack_unlink(2); + stack_pop_2_elems_keep_top(); } }); @@ -833,7 +833,7 @@ OPCODE0(F_DEC, "--x", 0, { push_int(1); o_subtract(); assign_lvalue(Pike_sp-3, Pike_sp-1); - stack_unlink(2); + stack_pop_2_elems_keep_top(); } }); @@ -893,7 +893,7 @@ OPCODE0(F_POST_INC, "x++", 0, { f_add(2); assign_lvalue(Pike_sp-4, Pike_sp-1); pop_stack(); - stack_unlink(2); + stack_pop_2_elems_keep_top(); print_return_value(); } }); @@ -916,7 +916,7 @@ OPCODE0(F_POST_DEC, "x--", 0, { o_subtract(); assign_lvalue(Pike_sp-4, Pike_sp-1); pop_stack(); - stack_unlink(2); + stack_pop_2_elems_keep_top(); print_return_value(); } }); @@ -1897,7 +1897,7 @@ OPCODE1(F_CALL_OTHER,"call other", I_PC_AT_NEXT, { Pike_fp->flags |= PIKE_FRAME_RETURN_INTERNAL; DO_JUMP_TO(Pike_fp->pc); } - stack_unlink(1); + stack_pop_keep_top(); DONE; } } @@ -2004,7 +2004,7 @@ OPCODE1(F_CALL_OTHER_AND_RETURN,"call other & return", 0, { unlink_previous_frame(); DO_JUMP_TO(addr); } - stack_unlink(1); + stack_pop_keep_top(); DO_DUMB_RETURN; } } diff --git a/src/iterators.cmod b/src/iterators.cmod index e3aa86232139def1fb1809c5dabcfededb09fe64..220acb1c37eba57067349875f9d4643ebd237258 100644 --- a/src/iterators.cmod +++ b/src/iterators.cmod @@ -2,11 +2,11 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: iterators.cmod,v 1.39 2003/04/22 14:03:12 jhs Exp $ +|| $Id: iterators.cmod,v 1.40 2003/04/27 17:52:42 mast Exp $ */ #include "global.h" -RCSID("$Id: iterators.cmod,v 1.39 2003/04/22 14:03:12 jhs Exp $"); +RCSID("$Id: iterators.cmod,v 1.40 2003/04/27 17:52:42 mast Exp $"); #include "main.h" #include "object.h" #include "mapping.h" @@ -62,7 +62,7 @@ DECLARATIONS *! back the iterator can move. Therefore iterators may support only a *! limited amount of backward movement, e.g. when they access a *! stream through a limited buffer. If such an iterator is moved back - *! past that limit then it'll behave as if it's pointing entirely + *! past the limit then it'll behave as if it's pointing entirely *! outside the data set (see above). *! *! An iterator that doesn't support backward movement at all should @@ -104,7 +104,7 @@ PIKECLASS Iterator prototype; {} - /*! @decl Iterator `+(int steps) + /*! @decl Iterator `+ (int steps) *! *! Returns a clone of this iterator which is advanced the specified *! number of steps. The amount may be negative to move backwards. @@ -116,15 +116,14 @@ PIKECLASS Iterator prototype; {} - /*! @decl Iterator `+=(int steps) + /*! @decl Iterator `+= (int steps) *! *! Advance this iterator the specified number of steps and return *! it. The amount may be negative to move backwards. If the *! iterator doesn't support backward movement it should throw an *! exception in that case. *! - *! @[foreach] currently only calls this function with a - *! step value of @expr{1@}. + *! @[foreach] calls this function with a step value of @expr{1@}. *! *! @note *! @[foreach] will call this function even when the the @@ -1775,7 +1774,7 @@ PIKEFUN object(Iterator) get_iterator(object|array|mapping|multiset|string data) if(FIND_LFUN(data->u.object->prog, LFUN__GET_ITERATOR) != -1) { apply_lfun(data->u.object, LFUN__GET_ITERATOR, 0); - stack_unlink(1); + stack_pop_keep_top(); return; } diff --git a/src/modules/files/stat.c b/src/modules/files/stat.c index 4fbdb848d7abc9eabc099eb8a7df96e9597f0f85..a34b37d8d4e090fdd8f1fe09eeb6f2a3b6543ba6 100644 --- a/src/modules/files/stat.c +++ b/src/modules/files/stat.c @@ -2,11 +2,11 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: stat.c,v 1.27 2003/04/07 17:21:13 nilsson Exp $ +|| $Id: stat.c,v 1.28 2003/04/27 17:52:42 mast Exp $ */ #include "global.h" -RCSID("$Id: stat.c,v 1.27 2003/04/07 17:21:13 nilsson Exp $"); +RCSID("$Id: stat.c,v 1.28 2003/04/27 17:52:42 mast Exp $"); #include "fdlib.h" #include "interpret.h" #include "svalue.h" @@ -907,7 +907,7 @@ static void stat_values(INT32 args) f_index(2); } f_aggregate(z); - stack_pop_n_elems_keep_top(1); + stack_pop_keep_top(); } #undef THIS_STAT diff --git a/src/opcodes.c b/src/opcodes.c index 133c6f34ff6b4372f3aadd80370ae9546306de50..5a0fe8e75eb7e3d26b6f4881b74e8485806285ae 100644 --- a/src/opcodes.c +++ b/src/opcodes.c @@ -2,7 +2,7 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: opcodes.c,v 1.143 2003/03/14 15:50:45 grubba Exp $ +|| $Id: opcodes.c,v 1.144 2003/04/27 17:52:42 mast Exp $ */ #include "global.h" @@ -30,7 +30,7 @@ #define sp Pike_sp -RCSID("$Id: opcodes.c,v 1.143 2003/03/14 15:50:45 grubba Exp $"); +RCSID("$Id: opcodes.c,v 1.144 2003/04/27 17:52:42 mast Exp $"); void index_no_free(struct svalue *to,struct svalue *what,struct svalue *ind) { @@ -585,7 +585,7 @@ void o_cast(struct pike_type *type, INT32 run_time_type) ref_push_object(((struct pike_trampoline *) (Pike_sp[-1].u.object->storage))-> frame->current_object); - stack_pop_n_elems_keep_top(1); + stack_pop_keep_top(); } else { Pike_sp[-1].type = T_OBJECT; } diff --git a/src/operators.c b/src/operators.c index e61163f99718a5ae549998b43685859fb6f58cbb..fd62184a0636db76fa22a93e87bd42a09277c0f8 100644 --- a/src/operators.c +++ b/src/operators.c @@ -2,12 +2,12 @@ || This file is part of Pike. For copyright information see COPYRIGHT. || Pike is distributed under GPL, LGPL and MPL. See the file COPYING || for more information. -|| $Id: operators.c,v 1.175 2003/04/17 22:51:13 mast Exp $ +|| $Id: operators.c,v 1.176 2003/04/27 17:52:42 mast Exp $ */ #include "global.h" #include <math.h> -RCSID("$Id: operators.c,v 1.175 2003/04/17 22:51:13 mast Exp $"); +RCSID("$Id: operators.c,v 1.176 2003/04/27 17:52:42 mast Exp $"); #include "interpret.h" #include "svalue.h" #include "multiset.h" @@ -251,7 +251,7 @@ PMOD_EXPORT void f_add(INT32 args) FIND_LFUN(sp[-args].u.object->prog,LFUN_ADD_EQ) != -1) { apply_lfun(sp[-args].u.object, LFUN_ADD_EQ, args-1); - stack_unlink(1); + stack_pop_keep_top(); return; } if(FIND_LFUN(sp[-args].u.object->prog,LFUN_ADD) != -1)