summaryrefslogtreecommitdiff
path: root/sv.h
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2021-09-27 10:02:01 +0000
committerNicholas Clark <nick@ccl4.org>2021-10-11 11:30:25 +0000
commitcaf0b9e5682bde101a4ee56b69daee5f3362ad0e (patch)
tree044c0e6a53d84f1c2d2c190a14c2911144bf98a0 /sv.h
parent9710057bff258cbe68d25e718b0eeecf5c92cccc (diff)
downloadperl-caf0b9e5682bde101a4ee56b69daee5f3362ad0e.tar.gz
Rename HE_SVSLOT to HE_ARENA_ROOT_IX
The longer name more accurately reflects what the constant refers to. Correct the comments describing how some arena roots are re-used.
Diffstat (limited to 'sv.h')
-rw-r--r--sv.h8
1 files changed, 3 insertions, 5 deletions
diff --git a/sv.h b/sv.h
index ef901f9da8..83fa92380b 100644
--- a/sv.h
+++ b/sv.h
@@ -173,12 +173,10 @@ typedef enum {
# define SVt_RV SVt_IV
#endif
-/* There is collusion here with sv_clear - sv_clear exits early for SVt_NULL
- 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
- non-zero to record the size of HEs, without fear of bogus frees. */
+/* The array of arena roots for SV bodies is indexed by SvTYPE. SVt_NULL doesn't
+ * use a body, so that arena root is re-used for HEs. */
#if defined(PERL_IN_HV_C) || defined(PERL_IN_XS_APITEST)
-#define HE_SVSLOT SVt_NULL
+# define HE_ARENA_ROOT_IX SVt_NULL
#endif
#ifdef PERL_IN_SV_C
# define SVt_FIRST SVt_NULL /* the type of SV that new_SV() in sv.c returns */