From 33f29a4cec504672835fd47a5b11657983d0209e Mon Sep 17 00:00:00 2001 From: Karl Williamson Date: Mon, 26 Nov 2012 16:06:53 -0700 Subject: [PATCH] Remove 3 unused interpreter variables These variables have been unused in the Perl core since commit 4c88d5e0740d796bf5064336d280bba72897f385. The variables are undocumented. The only real use of any of these I found in CPAN is at https://metacpan.org/source/ABERGMAN/Devel-GC-Helper-0.25/Helper.xs#L1 The uses there appear to be in a list of known Perl variables. Since the module was published, more than a few new variables have been added, making this code obsolete anyway. --- embedvar.h | 3 --- intrpvar.h | 3 --- perl.c | 6 ------ sv.c | 3 --- 4 files changed, 15 deletions(-) diff --git a/embedvar.h b/embedvar.h index 47e0b32..0c25f34 100644 --- a/embedvar.h +++ b/embedvar.h @@ -354,7 +354,6 @@ #define PL_utf8_X_regular_begin (vTHX->Iutf8_X_regular_begin) #define PL_utf8_alnum (vTHX->Iutf8_alnum) #define PL_utf8_alpha (vTHX->Iutf8_alpha) -#define PL_utf8_blank (vTHX->Iutf8_blank) #define PL_utf8_charname_begin (vTHX->Iutf8_charname_begin) #define PL_utf8_charname_continue (vTHX->Iutf8_charname_continue) #define PL_utf8_digit (vTHX->Iutf8_digit) @@ -368,13 +367,11 @@ #define PL_utf8_perl_idstart (vTHX->Iutf8_perl_idstart) #define PL_utf8_print (vTHX->Iutf8_print) #define PL_utf8_punct (vTHX->Iutf8_punct) -#define PL_utf8_space (vTHX->Iutf8_space) #define PL_utf8_tofold (vTHX->Iutf8_tofold) #define PL_utf8_tolower (vTHX->Iutf8_tolower) #define PL_utf8_totitle (vTHX->Iutf8_totitle) #define PL_utf8_toupper (vTHX->Iutf8_toupper) #define PL_utf8_upper (vTHX->Iutf8_upper) -#define PL_utf8_xdigit (vTHX->Iutf8_xdigit) #define PL_utf8_xidcont (vTHX->Iutf8_xidcont) #define PL_utf8_xidstart (vTHX->Iutf8_xidstart) #define PL_utf8cache (vTHX->Iutf8cache) diff --git a/intrpvar.h b/intrpvar.h index 2a2913c..5a6a4f1 100644 --- a/intrpvar.h +++ b/intrpvar.h @@ -613,15 +613,12 @@ PERLVAR(I, HasMultiCharFold, SV *) /* utf8 character class swashes */ PERLVAR(I, utf8_alnum, SV *) PERLVAR(I, utf8_alpha, SV *) -PERLVAR(I, utf8_blank, SV *) -PERLVAR(I, utf8_space, SV *) PERLVAR(I, utf8_graph, SV *) PERLVAR(I, utf8_digit, SV *) PERLVAR(I, utf8_upper, SV *) PERLVAR(I, utf8_lower, SV *) PERLVAR(I, utf8_print, SV *) PERLVAR(I, utf8_punct, SV *) -PERLVAR(I, utf8_xdigit, SV *) PERLVAR(I, utf8_mark, SV *) PERLVAR(I, utf8_X_regular_begin, SV *) PERLVAR(I, utf8_X_extend, SV *) diff --git a/perl.c b/perl.c index 51cc6e4..0ebaeac 100644 --- a/perl.c +++ b/perl.c @@ -987,15 +987,12 @@ perl_destruct(pTHXx) /* clear utf8 character classes */ SvREFCNT_dec(PL_utf8_alnum); SvREFCNT_dec(PL_utf8_alpha); - SvREFCNT_dec(PL_utf8_blank); - SvREFCNT_dec(PL_utf8_space); SvREFCNT_dec(PL_utf8_graph); SvREFCNT_dec(PL_utf8_digit); SvREFCNT_dec(PL_utf8_upper); SvREFCNT_dec(PL_utf8_lower); SvREFCNT_dec(PL_utf8_print); SvREFCNT_dec(PL_utf8_punct); - SvREFCNT_dec(PL_utf8_xdigit); SvREFCNT_dec(PL_utf8_mark); SvREFCNT_dec(PL_utf8_toupper); SvREFCNT_dec(PL_utf8_totitle); @@ -1006,15 +1003,12 @@ perl_destruct(pTHXx) SvREFCNT_dec(PL_utf8_foldclosures); PL_utf8_alnum = NULL; PL_utf8_alpha = NULL; - PL_utf8_blank = NULL; - PL_utf8_space = NULL; PL_utf8_graph = NULL; PL_utf8_digit = NULL; PL_utf8_upper = NULL; PL_utf8_lower = NULL; PL_utf8_print = NULL; PL_utf8_punct = NULL; - PL_utf8_xdigit = NULL; PL_utf8_mark = NULL; PL_utf8_toupper = NULL; PL_utf8_totitle = NULL; diff --git a/sv.c b/sv.c index 37344ae..0a4d26f 100644 --- a/sv.c +++ b/sv.c @@ -13432,15 +13432,12 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags, /* utf8 character class swashes */ PL_utf8_alnum = sv_dup_inc(proto_perl->Iutf8_alnum, param); PL_utf8_alpha = sv_dup_inc(proto_perl->Iutf8_alpha, param); - PL_utf8_blank = sv_dup_inc(proto_perl->Iutf8_blank, param); - PL_utf8_space = sv_dup_inc(proto_perl->Iutf8_space, param); PL_utf8_graph = sv_dup_inc(proto_perl->Iutf8_graph, param); PL_utf8_digit = sv_dup_inc(proto_perl->Iutf8_digit, param); PL_utf8_upper = sv_dup_inc(proto_perl->Iutf8_upper, param); PL_utf8_lower = sv_dup_inc(proto_perl->Iutf8_lower, param); PL_utf8_print = sv_dup_inc(proto_perl->Iutf8_print, param); PL_utf8_punct = sv_dup_inc(proto_perl->Iutf8_punct, param); - PL_utf8_xdigit = sv_dup_inc(proto_perl->Iutf8_xdigit, param); PL_utf8_mark = sv_dup_inc(proto_perl->Iutf8_mark, param); PL_utf8_X_regular_begin = sv_dup_inc(proto_perl->Iutf8_X_regular_begin, param); PL_utf8_X_extend = sv_dup_inc(proto_perl->Iutf8_X_extend, param); -- 2.7.4