From 089b0891ca11bafd886d2774eec7039dea82fc60 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Henrik=20Grubbstr=C3=B6m=20=28Grubba=29?=
 <grubba@grubba.org>
Date: Sun, 30 Apr 2000 13:05:08 +0200
Subject: [PATCH] Fixed DMALLOC inconsistency for f_aggregate().

Rev: src/builtin_functions.c:1.269
Rev: src/builtin_functions.h:1.13
---
 src/builtin_functions.c | 15 +++------------
 src/builtin_functions.h |  8 ++++----
 2 files changed, 7 insertions(+), 16 deletions(-)

diff --git a/src/builtin_functions.c b/src/builtin_functions.c
index c937bb86a1..9b63265beb 100644
--- a/src/builtin_functions.c
+++ b/src/builtin_functions.c
@@ -5,7 +5,7 @@
 \*/
 /**/
 #include "global.h"
-RCSID("$Id: builtin_functions.c,v 1.268 2000/04/28 17:14:47 noring Exp $");
+RCSID("$Id: builtin_functions.c,v 1.269 2000/04/30 11:05:08 grubba Exp $");
 #include "interpret.h"
 #include "svalue.h"
 #include "pike_macros.h"
@@ -70,11 +70,7 @@ void f_equal(INT32 args)
   push_int(i);
 }
 
-#ifdef DEBUG_MALLOC
-void _f_aggregate(INT32 args)
-#else
-void f_aggregate(INT32 args)
-#endif
+void debug_f_aggregate(INT32 args)
 {
   struct array *a;
 #ifdef PIKE_DEBUG
@@ -5794,13 +5790,8 @@ void init_builtin_efuns(void)
 	   tFunc(tStr tOr(tVoid,tMix),tVoid),OPT_SIDE_EFFECT);
 
 /* function(0=mixed ...:array(0)) */
-#ifdef DEBUG_MALLOC
-  ADD_EFUN("aggregate",_f_aggregate,
+  ADD_EFUN("aggregate",debug_f_aggregate,
 	   tFuncV(tNone,tSetvar(0,tMix),tArr(tVar(0))),OPT_TRY_OPTIMIZE);
-#else
-  ADD_EFUN("aggregate",f_aggregate,
-	   tFuncV(tNone,tSetvar(0,tMix),tArr(tVar(0))),OPT_TRY_OPTIMIZE);
-#endif
   
 /* function(0=mixed ...:multiset(0)) */
   ADD_EFUN("aggregate_multiset",f_aggregate_multiset,
diff --git a/src/builtin_functions.h b/src/builtin_functions.h
index 043a4aea2e..58b156ee31 100644
--- a/src/builtin_functions.h
+++ b/src/builtin_functions.h
@@ -5,7 +5,7 @@
 \*/
 
 /*
- * $Id: builtin_functions.h,v 1.12 2000/02/17 00:31:07 hubbe Exp $
+ * $Id: builtin_functions.h,v 1.13 2000/04/30 11:05:08 grubba Exp $
  */
 #ifndef BUILTIN_EFUNS_H
 #define BUILTIN_EFUNS_H
@@ -15,11 +15,11 @@
 #include "callback.h"
 
 /* Prototypes begin here */
+void debug_f_aggregate(INT32 args);
 #ifdef DEBUG_MALLOC
-void _f_aggregate(INT32 args);
-#define f_aggregate(X) do { _f_aggregate(X); debug_malloc_touch(Pike_sp[-1].u.refs); } while (0)
+#define f_aggregate(X) do { debug_f_aggregate(X); debug_malloc_touch(Pike_sp[-1].u.refs); } while (0)
 #else
-void f_aggregate(INT32 args);
+#define f_aggregate(X) debug_f_aggregate(X)
 #endif
 
 void f_equal(INT32 args);
-- 
GitLab