Skip to content

Make PL_utf8_foldclosures interpreter level #17827

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions embedvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,7 @@
#define PL_unsafe (vTHX->Iunsafe)
#define PL_utf8_charname_begin (vTHX->Iutf8_charname_begin)
#define PL_utf8_charname_continue (vTHX->Iutf8_charname_continue)
#define PL_utf8_foldclosures (vTHX->Iutf8_foldclosures)
#define PL_utf8_idcont (vTHX->Iutf8_idcont)
#define PL_utf8_idstart (vTHX->Iutf8_idstart)
#define PL_utf8_mark (vTHX->Iutf8_mark)
Expand Down Expand Up @@ -497,8 +498,6 @@
#define PL_Guser_def_props_aTHX (my_vars->Guser_def_props_aTHX)
#define PL_user_prop_mutex (my_vars->Guser_prop_mutex)
#define PL_Guser_prop_mutex (my_vars->Guser_prop_mutex)
#define PL_utf8_foldclosures (my_vars->Gutf8_foldclosures)
#define PL_Gutf8_foldclosures (my_vars->Gutf8_foldclosures)
#define PL_veto_cleanup (my_vars->Gveto_cleanup)
#define PL_Gveto_cleanup (my_vars->Gveto_cleanup)
#define PL_watch_pvx (my_vars->Gwatch_pvx)
Expand Down
4 changes: 4 additions & 0 deletions intrpvar.h
Original file line number Diff line number Diff line change
Expand Up @@ -915,6 +915,10 @@ PERLVAR(I, UpperLatin1, SV *) /* Code points 128 - 255 */
/* List of characters that participate in any fold defined by Unicode */
PERLVAR(I, in_some_fold, SV *)

/* Everything that folds to a given character, for case insensitivity regex
* matching */
PERLVAR(I, utf8_foldclosures, SV *)

PERLVAR(I, utf8_idcont, SV *)
PERLVAR(I, utf8_idstart, SV *)
PERLVAR(I, utf8_perl_idcont, SV *)
Expand Down
2 changes: 2 additions & 0 deletions perl.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,8 @@ perl_destruct(pTHXx)
PL_UpperLatin1 = NULL;
SvREFCNT_dec(PL_in_some_fold);
PL_in_some_fold = NULL;
SvREFCNT_dec(PL_utf8_foldclosures);
PL_utf8_foldclosures = NULL;
SvREFCNT_dec(PL_utf8_idcont);
PL_utf8_idcont = NULL;
SvREFCNT_dec(PL_utf8_idstart);
Expand Down
2 changes: 0 additions & 2 deletions perlapi.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,6 @@ END_EXTERN_C
#define PL_user_def_props_aTHX (*Perl_Guser_def_props_aTHX_ptr(NULL))
#undef PL_user_prop_mutex
#define PL_user_prop_mutex (*Perl_Guser_prop_mutex_ptr(NULL))
#undef PL_utf8_foldclosures
#define PL_utf8_foldclosures (*Perl_Gutf8_foldclosures_ptr(NULL))
#undef PL_veto_cleanup
#define PL_veto_cleanup (*Perl_Gveto_cleanup_ptr(NULL))
#undef PL_watch_pvx
Expand Down
4 changes: 0 additions & 4 deletions perlvars.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,10 +305,6 @@ PERLVAR(G, user_prop_mutex, perl_mutex) /* Mutex for manipulating
PL_user_defined_properties */
#endif

/* Everything that folds to a given character, for case insensitivity regex
* matching */
PERLVAR(G, utf8_foldclosures, SV *)

/* these record the best way to perform certain IO operations while
* atomically setting FD_CLOEXEC. On the first call, a probe is done
* and the result recorded for use by subsequent calls.
Expand Down
1 change: 1 addition & 0 deletions sv.c
Original file line number Diff line number Diff line change
Expand Up @@ -15731,6 +15731,7 @@ perl_clone_using(PerlInterpreter *proto_perl, UV flags,
PL_SCX_invlist = sv_dup_inc(proto_perl->ISCX_invlist, param);
PL_UpperLatin1 = sv_dup_inc(proto_perl->IUpperLatin1, param);
PL_in_some_fold = sv_dup_inc(proto_perl->Iin_some_fold, param);
PL_utf8_foldclosures = sv_dup_inc(proto_perl->Iutf8_foldclosures, param);
PL_utf8_idcont = sv_dup_inc(proto_perl->Iutf8_idcont, param);
PL_utf8_idstart = sv_dup_inc(proto_perl->Iutf8_idstart, param);
PL_utf8_perl_idcont = sv_dup_inc(proto_perl->Iutf8_perl_idcont, param);
Expand Down