summaryrefslogtreecommitdiff
path: root/sv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2005-11-16 23:40:55 +0000
committerNicholas Clark <nick@ccl4.org>2005-11-16 23:40:55 +0000
commitd4d97442eccd75702fefc796c9d6c90f521a6f06 (patch)
treecd78bc01651d9d3b7473939d7a27efb2afa49c04 /sv.c
parent7994ab570190ecbe2fce4549592cfcd8bb620e43 (diff)
downloadperl-d4d97442eccd75702fefc796c9d6c90f521a6f06.tar.gz
Oi gcc, No! sizeof(void) is an error. *Not* 1.
Wanting sizeof(void) isn't even a compilation error with -ansi -pedantic. Just a warning. Lame! I'm going to send it back for a full refund. Hateful software. p4raw-id: //depot/perl@26143
Diffstat (limited to 'sv.c')
-rw-r--r--sv.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/sv.c b/sv.c
index da75a98119..f01695b140 100644
--- a/sv.c
+++ b/sv.c
@@ -1265,16 +1265,16 @@ static int offset_by_svtype[] = {
#define new_body_type(sv_type) \
- S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type) \
- + offset_by_svtype[sv_type]
+ (void *)((char *)S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type)\
+ + offset_by_svtype[sv_type])
#define del_body_type(p, sv_type) \
del_body(p, &PL_body_roots[sv_type])
#define new_body_allocated(sv_type) \
- S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type) \
- + offset_by_svtype[sv_type]
+ (void *)((char *)S_new_body(aTHX_ sizeof_body_by_svtype[sv_type], sv_type)\
+ + offset_by_svtype[sv_type])
#define del_body_allocated(p, sv_type) \
del_body(p - offset_by_svtype[sv_type], &PL_body_roots[sv_type])