diff options
author | Karl Williamson <khw@cpan.org> | 2018-03-13 21:52:15 -0600 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2018-03-14 09:35:35 -0600 |
commit | 744ebf52f3e4ca5e41d9ce8bc68e10cae14592a0 (patch) | |
tree | 2a41d4ff70b04876f40f0e5b442f470465b5c476 /perlapi.h | |
parent | 32a62865ef662fce2b2250a7e0eca15861e7fe20 (diff) | |
download | perl-744ebf52f3e4ca5e41d9ce8bc68e10cae14592a0.tar.gz |
Make Unicode data structures global
These structures are read-only, use const C strings, and are truly
global, so no need to have them be interpreter level. This saves
duplicating and freeing them as threads come and go.
In doing this, I noticed that not every one was properly being
copied/deallocated, so this fixes some potential unreported bugs, and
leaks.
Diffstat (limited to 'perlapi.h')
-rw-r--r-- | perlapi.h | 38 |
1 files changed, 38 insertions, 0 deletions
@@ -99,8 +99,32 @@ END_EXTERN_C #else /* !PERL_CORE */ +#undef PL_AboveLatin1 +#define PL_AboveLatin1 (*Perl_GAboveLatin1_ptr(NULL)) +#undef PL_Assigned_invlist +#define PL_Assigned_invlist (*Perl_GAssigned_invlist_ptr(NULL)) #undef PL_C_locale_obj #define PL_C_locale_obj (*Perl_GC_locale_obj_ptr(NULL)) +#undef PL_GCB_invlist +#define PL_GCB_invlist (*Perl_GGCB_invlist_ptr(NULL)) +#undef PL_HasMultiCharFold +#define PL_HasMultiCharFold (*Perl_GHasMultiCharFold_ptr(NULL)) +#undef PL_LB_invlist +#define PL_LB_invlist (*Perl_GLB_invlist_ptr(NULL)) +#undef PL_Latin1 +#define PL_Latin1 (*Perl_GLatin1_ptr(NULL)) +#undef PL_NonL1NonFinalFold +#define PL_NonL1NonFinalFold (*Perl_GNonL1NonFinalFold_ptr(NULL)) +#undef PL_SB_invlist +#define PL_SB_invlist (*Perl_GSB_invlist_ptr(NULL)) +#undef PL_SCX_invlist +#define PL_SCX_invlist (*Perl_GSCX_invlist_ptr(NULL)) +#undef PL_UpperLatin1 +#define PL_UpperLatin1 (*Perl_GUpperLatin1_ptr(NULL)) +#undef PL_WB_invlist +#define PL_WB_invlist (*Perl_GWB_invlist_ptr(NULL)) +#undef PL_XPosix_ptrs +#define PL_XPosix_ptrs (*Perl_GXPosix_ptrs_ptr(NULL)) #undef PL_appctx #define PL_appctx (*Perl_Gappctx_ptr(NULL)) #undef PL_check @@ -181,6 +205,20 @@ END_EXTERN_C #define PL_timesbase (*Perl_Gtimesbase_ptr(NULL)) #undef PL_use_safe_putenv #define PL_use_safe_putenv (*Perl_Guse_safe_putenv_ptr(NULL)) +#undef PL_utf8_foldable +#define PL_utf8_foldable (*Perl_Gutf8_foldable_ptr(NULL)) +#undef PL_utf8_idcont +#define PL_utf8_idcont (*Perl_Gutf8_idcont_ptr(NULL)) +#undef PL_utf8_idstart +#define PL_utf8_idstart (*Perl_Gutf8_idstart_ptr(NULL)) +#undef PL_utf8_perl_idcont +#define PL_utf8_perl_idcont (*Perl_Gutf8_perl_idcont_ptr(NULL)) +#undef PL_utf8_perl_idstart +#define PL_utf8_perl_idstart (*Perl_Gutf8_perl_idstart_ptr(NULL)) +#undef PL_utf8_xidcont +#define PL_utf8_xidcont (*Perl_Gutf8_xidcont_ptr(NULL)) +#undef PL_utf8_xidstart +#define PL_utf8_xidstart (*Perl_Gutf8_xidstart_ptr(NULL)) #undef PL_veto_cleanup #define PL_veto_cleanup (*Perl_Gveto_cleanup_ptr(NULL)) #undef PL_watch_pvx |