Make sure mathoms gets loaded

This commit is contained in:
Karl Williamson 2025-07-26 10:22:20 -06:00 committed by Karl Williamson
parent 5df7a2e227
commit 0f6279cac4
5 changed files with 25 additions and 0 deletions

View File

@ -1807,6 +1807,7 @@ ERXp |HV * |load_charnames |NN SV *char_name \
|NN const char *context \
|const STRLEN context_len \
|NN const char **error_msg
MTbp |void |load_mathoms
AFdpv |void |load_module |U32 flags \
|NN SV *name \
|NULLOK SV *ver \

1
embedvar.h generated
View File

@ -164,6 +164,7 @@
# define PL_less_dicey_locale_buf (vTHX->Iless_dicey_locale_buf)
# define PL_less_dicey_locale_bufsize (vTHX->Iless_dicey_locale_bufsize)
# define PL_LIO (vTHX->ILIO)
# define PL_load_mathoms (vTHX->Iload_mathoms)
# define PL_locale_mutex_depth (vTHX->Ilocale_mutex_depth)
# define PL_localizing (vTHX->Ilocalizing)
# define PL_localpatches (vTHX->Ilocalpatches)

View File

@ -1101,6 +1101,18 @@ PERLVAR(I, prevailing_version, U16)
PERLVARI(I, in_diehook, bool, FALSE)
PERLVARI(I, in_warnhook, bool, FALSE)
/* Perl_load_mathoms is defined in mathoms.c, so this forces the loading of the
* functions in that file when NO_MATHOMS isn't defined. Otherwise, it is just
* a pointer to a function that is always going to exist. The use of
* Perl_noshutdownhook is solely because there is a typedef for its signature
* and has no arguments that need to be passed */
#ifdef NO_MATHOMS
# define PERL_LOAD_MATHOMS_HOOK Perl_noshutdownhook
#else
# define PERL_LOAD_MATHOMS_HOOK Perl_load_mathoms
#endif
PERLVARI(I, load_mathoms, shutdown_proc_t, PERL_LOAD_MATHOMS_HOOK)
/* If you are adding a U8 or U16, check to see if there are 'Space' comments
* above on where there are gaps which currently will be structure padding. */

View File

@ -73,6 +73,13 @@
* without a compiler warning */
GCC_DIAG_IGNORE(-Wdeprecated-declarations)
void
Perl_load_mathoms()
{
/* This exists only to make sure the functions in this file get loaded, as
* it is referred to by a structure element in intrpvar.h */
}
/* ref() is now a macro using Perl_doref;
* this version provided for binary compatibility only.
*/

4
proto.h generated
View File

@ -6008,6 +6008,10 @@ Perl_malloced_size(void *p)
#endif /* defined(MYMALLOC) */
#if !defined(NO_MATHOMS)
PERL_CALLCONV void
Perl_load_mathoms(void);
# define PERL_ARGS_ASSERT_LOAD_MATHOMS
PERL_CALLCONV void
Perl_sv_nolocking(pTHX_ SV *sv)
__attribute__deprecated__;