summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorJim Cromie <jcromie@cpan.org>2006-02-13 07:12:41 -0700
committerNicholas Clark <nick@ccl4.org>2006-02-18 00:11:07 +0000
commitd2a0f284b32a9deb0ebffbb06cf667a0ea1ea610 (patch)
treef447dfe2dda7f4f6e48523d610a9f3d008a11ddb /sv.h
parent05c462c41ad946db6e5d1f4f4e5bffc04b8bd608 (diff)
downloadperl-d2a0f284b32a9deb0ebffbb06cf667a0ea1ea610.tar.gz
arena-rework : consolidated patch
Message-ID: <43F0F649.9040205@gmail.com> Tweaked somewhat to split the arena boolean from the arena_size, and with the PTE still doubling-up with one of the SV types in the array. p4raw-id: //depot/perl@27215
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/sv.h b/sv.h
index 89b4a9eb7d..dd4302c498 100644
--- a/sv.h
+++ b/sv.h
@@ -63,8 +63,13 @@ typedef enum {
SVt_LAST /* keep last in enum. used to size arrays */
} svtype;
+/* There is collusion here with sv_clear - sv_clear exits early for SVt_NULL
+ and SVt_IV, so never reaches the clause at the end that uses
+ sv_type_details->body_size to determine whether to call safefree(). Hence
+ body_size can be set no-zero to record the size of PTEs and HEs, without
+ fear of bogus frees. */
#ifdef PERL_IN_SV_C
-#define PTE_SVSLOT SVt_RV
+#define PTE_SVSLOT SVt_IV
#endif
#if defined(PERL_IN_HV_C) || defined(PERL_IN_XS_APITEST)
#define HE_SVSLOT SVt_NULL