From 58541fd098aa0d251e855323d6cfefb3daa4ad95 Mon Sep 17 00:00:00 2001 From: "Paul \"LeoNerd\" Evans" Date: Sun, 3 Oct 2021 11:47:35 +0100 Subject: Expose a public SAVESTRLEN() macro This seems to have been forgotten in the public API, perhaps because it was added later. Fixes #19165 --- pad.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'pad.c') diff --git a/pad.c b/pad.c index 337548aacc..b5f88219b1 100644 --- a/pad.c +++ b/pad.c @@ -204,11 +204,11 @@ Perl_pad_new(pTHX_ int flags) SAVECOMPPAD(); if (! (flags & padnew_CLONE)) { SAVESPTR(PL_comppad_name); - save_strlen((STRLEN *)&PL_padix); - save_strlen((STRLEN *)&PL_constpadix); - save_strlen((STRLEN *)&PL_comppad_name_fill); - save_strlen((STRLEN *)&PL_min_intro_pending); - save_strlen((STRLEN *)&PL_max_intro_pending); + SAVESTRLEN(PL_padix); + SAVESTRLEN(PL_constpadix); + SAVESTRLEN(PL_comppad_name_fill); + SAVESTRLEN(PL_min_intro_pending); + SAVESTRLEN(PL_max_intro_pending); SAVEBOOL(PL_cv_has_eval); if (flags & padnew_SAVESUB) { SAVEBOOL(PL_pad_reset_pending); @@ -1402,17 +1402,17 @@ void Perl_pad_block_start(pTHX_ int full) { ASSERT_CURPAD_ACTIVE("pad_block_start"); - save_strlen((STRLEN *)&PL_comppad_name_floor); + SAVESTRLEN(PL_comppad_name_floor); PL_comppad_name_floor = PadnamelistMAX(PL_comppad_name); if (full) PL_comppad_name_fill = PL_comppad_name_floor; if (PL_comppad_name_floor < 0) PL_comppad_name_floor = 0; - save_strlen((STRLEN *)&PL_min_intro_pending); - save_strlen((STRLEN *)&PL_max_intro_pending); + SAVESTRLEN(PL_min_intro_pending); + SAVESTRLEN(PL_max_intro_pending); PL_min_intro_pending = 0; - save_strlen((STRLEN *)&PL_comppad_name_fill); - save_strlen((STRLEN *)&PL_padix_floor); + SAVESTRLEN(PL_comppad_name_fill); + SAVESTRLEN(PL_padix_floor); /* PL_padix_floor is what PL_padix is reset to at the start of each statement, by pad_reset(). We set it when entering a new scope to keep things like this working: -- cgit v1.2.1