diff --git a/src/array.c b/src/array.c index b00d344718eded6cfcead4cd2ed23678bc20dfeb..314323866f127de71f0cc4cb5ffff746f8a931e0 100644 --- a/src/array.c +++ b/src/array.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: array.c,v 1.172 2004/09/27 21:47:49 nilsson Exp $ +|| $Id: array.c,v 1.173 2004/09/30 14:00:13 mast Exp $ */ #include "global.h" @@ -69,8 +69,8 @@ PMOD_EXPORT void dont_accept_unfinished_type_fields (void *orig) * NOTE: the new array has zero references */ -PMOD_EXPORT struct array *low_allocate_array(ptrdiff_t size, - ptrdiff_t extra_space) +PMOD_EXPORT struct array *real_allocate_array(ptrdiff_t size, + ptrdiff_t extra_space) { struct array *v; ptrdiff_t e; diff --git a/src/array.h b/src/array.h index 00dec73e84a3f331107daeeab5e6f629685492d9..76a1a54c45835a412557de4ce8571545b166fac4 100644 --- a/src/array.h +++ b/src/array.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: array.h,v 1.65 2004/09/28 23:58:26 mast Exp $ +|| $Id: array.h,v 1.66 2004/09/30 14:00:14 mast Exp $ */ #ifndef ARRAY_H @@ -87,8 +87,12 @@ typedef int (*short_cmpfun)(union anything *, union anything *); typedef short_cmpfun (*cmpfun_getter)(TYPE_T); +#define low_allocate_array(size, extra_space) \ + dmalloc_touch (struct array *, \ + real_allocate_array ((size), (extra_space))) + /* Prototypes begin here */ -PMOD_EXPORT struct array *low_allocate_array(ptrdiff_t size, ptrdiff_t extra_space); +PMOD_EXPORT struct array *real_allocate_array(ptrdiff_t size, ptrdiff_t extra_space); PMOD_EXPORT void really_free_array(struct array *v); PMOD_EXPORT void do_free_array(struct array *a); PMOD_EXPORT struct array *array_set_flags(struct array *a, int flags); diff --git a/src/multiset.c b/src/multiset.c index d8cb6a17799df64db0ecb7ea86f0cecb9c2c732d..8418120aa59cb25f73dccf5904b07bc9314d09d9 100644 --- a/src/multiset.c +++ b/src/multiset.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: multiset.c,v 1.89 2004/09/30 02:33:06 nilsson Exp $ +|| $Id: multiset.c,v 1.90 2004/09/30 14:00:15 mast Exp $ */ #include "global.h" @@ -839,9 +839,9 @@ PMOD_EXPORT INT32 multiset_sizeof (struct multiset *l) return size; } -PMOD_EXPORT struct multiset *allocate_multiset (int allocsize, - int flags, - struct svalue *cmp_less) +PMOD_EXPORT struct multiset *real_allocate_multiset (int allocsize, + int flags, + struct svalue *cmp_less) { struct multiset *l = alloc_multiset(); diff --git a/src/multiset.h b/src/multiset.h index cdcd9248282e856fdb801d37180f72cf468a0d84..53eca44fd01d3d672b7c68d50e5d588ed265d6f7 100644 --- a/src/multiset.h +++ b/src/multiset.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: multiset.h,v 1.38 2004/09/28 23:58:26 mast Exp $ +|| $Id: multiset.h,v 1.39 2004/09/30 14:00:15 mast Exp $ */ #ifndef MULTISET_H @@ -358,9 +358,13 @@ PMOD_EXPORT int msnode_is_deleted (struct multiset *l, ptrdiff_t nodepos); #define push_multiset_value(L, NODEPOS) \ push_svalue (get_multiset_value (L, NODEPOS)) -PMOD_EXPORT struct multiset *allocate_multiset (int allocsize, - int flags, - struct svalue *cmp_less); +#define allocate_multiset(allocsize, flags, cmp_less) \ + dmalloc_touch (struct multiset *, \ + real_allocate_multiset ((allocsize), (flags), (cmp_less))) + +PMOD_EXPORT struct multiset *real_allocate_multiset (int allocsize, + int flags, + struct svalue *cmp_less); PMOD_EXPORT void do_free_multiset (struct multiset *l); void multiset_fix_type_field (struct multiset *l); PMOD_EXPORT void multiset_set_flags (struct multiset *l, int flags);