diff options
author | Nicholas Clark <nick@ccl4.org> | 2010-08-15 13:14:44 +0100 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2010-08-15 13:22:32 +0100 |
commit | beeec492daca10de7e6f32d0689c6854448e5e7c (patch) | |
tree | c8aba803f17522e3216d0d5a27b5cec545bd9533 /sv.c | |
parent | df0f0429ccebeabba13ec8a109ca11a9d158d8b1 (diff) | |
download | perl-beeec492daca10de7e6f32d0689c6854448e5e7c.tar.gz |
Remove the vestigial my_safe{calloc,malloc,free} macros from sv.c
These existed for LEAKTEST, which would change the implementations.
LEAKTEST was removed in 7bab3ede7bf671f5 in 2002.
Diffstat (limited to 'sv.c')
-rw-r--r-- | sv.c | 21 |
1 files changed, 8 insertions, 13 deletions
@@ -1014,18 +1014,13 @@ static const struct body_details bodies_by_type[] = { #define del_body_allocated(p, sv_type) \ del_body(p + bodies_by_type[sv_type].offset, &PL_body_roots[sv_type]) - -#define my_safemalloc(s) (void*)safemalloc(s) -#define my_safecalloc(s) (void*)safecalloc(s, 1) -#define my_safefree(p) safefree((char*)p) - #ifdef PURIFY -#define new_XNV() my_safemalloc(sizeof(XPVNV)) -#define new_XPVNV() my_safemalloc(sizeof(XPVNV)) -#define new_XPVMG() my_safemalloc(sizeof(XPVMG)) +#define new_XNV() safemalloc(sizeof(XPVNV)) +#define new_XPVNV() safemalloc(sizeof(XPVNV)) +#define new_XPVMG() safemalloc(sizeof(XPVMG)) -#define del_XPVGV(p) my_safefree(p) +#define del_XPVGV(p) safefree(p) #else /* !PURIFY */ @@ -1040,9 +1035,9 @@ static const struct body_details bodies_by_type[] = { /* no arena for you! */ #define new_NOARENA(details) \ - my_safemalloc((details)->body_size + (details)->offset) + safemalloc((details)->body_size + (details)->offset) #define new_NOARENAZ(details) \ - my_safecalloc((details)->body_size + (details)->offset) + safecalloc((details)->body_size + (details)->offset, 1) STATIC void * S_more_bodies (pTHX_ const svtype sv_type) @@ -1420,7 +1415,7 @@ Perl_sv_upgrade(pTHX_ register SV *const sv, svtype new_type) if (old_type > SVt_IV) { #ifdef PURIFY - my_safefree(old_body); + safefree(old_body); #else /* Note that there is an assumption that all bodies of types that can be upgraded came from arenas. Only the more complex non- @@ -5980,7 +5975,7 @@ Perl_sv_clear(pTHX_ register SV *const sv) &PL_body_roots[type]); } else if (sv_type_details->body_size) { - my_safefree(SvANY(sv)); + safefree(SvANY(sv)); } } |