diff --git a/src/modules/call_out/call_out.c b/src/modules/call_out/call_out.c index 21933583198af2dbed7b26ea0b3cb2338b5a49fa..bdbe41614267d9890eebc147252c3c6fcafc68e4 100644 --- a/src/modules/call_out/call_out.c +++ b/src/modules/call_out/call_out.c @@ -4,7 +4,7 @@ ||| See the files COPYING and DISCLAIMER for more information. \*/ #include "global.h" -RCSID("$Id: call_out.c,v 1.17 1997/10/28 03:07:59 hubbe Exp $"); +RCSID("$Id: call_out.c,v 1.18 1997/11/05 00:22:08 hubbe Exp $"); #include "array.h" #include "dynamic_buffer.h" #include "object.h" @@ -183,6 +183,7 @@ static struct array * new_call_out(int num_arg,struct svalue *argp) { int e,c; call_out *new,**p,**pos; + struct array *args; PROTECT_CALL_OUTS(); if(num_pending_calls==call_buffer_size) @@ -236,7 +237,7 @@ static struct array * new_call_out(int num_arg,struct svalue *argp) new->caller=0; } - new->args=sp[-1].u.array; + new->args=args=sp[-1].u.array; sp -= 2; num_pending_calls++; @@ -248,7 +249,7 @@ static struct array * new_call_out(int num_arg,struct svalue *argp) #endif UNPROTECT_CALL_OUTS(); - return new->args; + return args; } static void count_memory_in_call_outs(struct callback *foo, diff --git a/src/modules/call_out/testsuite.in b/src/modules/call_out/testsuite.in index 436827c3ccf77552533569db07f118eed5ea21a0..436bb869b97b83e225efea776c2521a97807e843 100644 --- a/src/modules/call_out/testsuite.in +++ b/src/modules/call_out/testsuite.in @@ -10,6 +10,6 @@ test_true(call_out_info()[-1][0] > 1) test_eq(find_call_out(call_out_info()[-1][2]), call_out_info()[-1][0]) test_eq(find_call_out(a),-1) test_true(zero_type(find_call_out(a))) -test_do(remove_call_out(call_out_info()[-1][2])) test_true(!sizeof(call_out_info()) || function_name(call_out_info()[-1][2])!="a") +test_do(remove_call_out(call_out_info()[-1][2])) test_do(_do_call_outs())