From 5108a343172bb3a8b0b867e5dedef144d7ca9803 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fredrik=20H=C3=BCbinette=20=28Hubbe=29?= <hubbe@hubbe.net> Date: Tue, 4 Nov 1997 16:22:09 -0800 Subject: [PATCH] call_out-disappearing bug finally fixed!! Rev: src/modules/call_out/call_out.c:1.18 Rev: src/modules/call_out/testsuite.in:1.3 --- src/modules/call_out/call_out.c | 7 ++++--- src/modules/call_out/testsuite.in | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/modules/call_out/call_out.c b/src/modules/call_out/call_out.c index 2193358319..bdbe416142 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 436827c3cc..436bb869b9 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()) -- GitLab