summaryrefslogtreecommitdiff
path: root/hv.c
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-21 17:43:31 +0100
committerNicholas Clark <nick@ccl4.org>2010-10-21 17:43:31 +0100
commit0de694c509edaf65aac76fe7d6e192754c4b6adc (patch)
tree4980602a9698d26d8737c58fabcc60a4ac921126 /hv.c
parent9b6e0960782ad1b03a313fa4234d0a35de5532bc (diff)
downloadperl-0de694c509edaf65aac76fe7d6e192754c4b6adc.tar.gz
Avoid using #ifdef inside a function call that may itself actually be a macro.
A tweak to 20439bc77dfeec46. Hopefully this fixes the build on Win32.
Diffstat (limited to 'hv.c')
-rw-r--r--hv.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/hv.c b/hv.c
index d5dacab3db..08867cf5d0 100644
--- a/hv.c
+++ b/hv.c
@@ -2988,12 +2988,16 @@ Perl_refcounted_he_new_pvn(pTHX_ struct refcounted_he *parent,
if (!hash)
PERL_HASH(hash, keypv, keylen);
+#ifdef USE_ITHREADS
he = (struct refcounted_he*)
PerlMemShared_malloc(sizeof(struct refcounted_he) - 1
-#ifdef USE_ITHREADS
+ keylen
-#endif
+ key_offset);
+#else
+ he = (struct refcounted_he*)
+ PerlMemShared_malloc(sizeof(struct refcounted_he) - 1
+ + key_offset);
+#endif
he->refcounted_he_next = parent;