@@ -347,11 +347,11 @@ static int debug_initialization = 0;
347
347
const char * errno_string; \
348
348
if (GET_ERRNO == 0) { /* Skip output if both errno types are 0 */ \
349
349
if (LIKELY (extended == 0 )) errno_string = "" ; \
350
- else errno_string = Perl_form ( aTHX_ "; $^E=%d" , extended ); \
350
+ else errno_string = form ( "; $^E=%d" , extended ); \
351
351
} \
352
352
else if (LIKELY (extended == GET_ERRNO )) \
353
- errno_string = Perl_form ( aTHX_ "; $!=%d" , GET_ERRNO ); \
354
- else errno_string = Perl_form ( aTHX_ "; $!=%d, $^E=%d" , \
353
+ errno_string = form ( "; $!=%d" , GET_ERRNO ); \
354
+ else errno_string = form ( "; $!=%d, $^E=%d" , \
355
355
GET_ERRNO , extended );
356
356
# else
357
357
/* Output the errno, if non-zero */
@@ -360,7 +360,7 @@ static int debug_initialization = 0;
360
360
const char * errno_string = ""; \
361
361
if (GET_ERRNO != 0) { \
362
362
dTHX; \
363
- errno_string = Perl_form(aTHX_ "; $!=%d", GET_ERRNO); \
363
+ errno_string = form( "; $!=%d", GET_ERRNO); \
364
364
}
365
365
# endif
366
366
@@ -956,14 +956,14 @@ S_get_displayable_string(pTHX_
956
956
if (cp == ' ' || cp == '\\' ) {
957
957
my_strlcat (ret , "\\" , size );
958
958
}
959
- my_strlcat (ret , Perl_form ( aTHX_ "%c" , (U8 ) cp ), size );
959
+ my_strlcat (ret , form ( "%c" , (U8 ) cp ), size );
960
960
prev_was_printable = TRUE;
961
961
}
962
962
else {
963
963
if (! first_time ) {
964
964
my_strlcat (ret , " " , size );
965
965
}
966
- my_strlcat (ret , Perl_form ( aTHX_ "%02" UVXf , cp ), size );
966
+ my_strlcat (ret , form ( "%02" UVXf , cp ), size );
967
967
prev_was_printable = FALSE;
968
968
}
969
969
t += (is_utf8 ) ? UTF8SKIP (t ) : 1 ;
@@ -1021,7 +1021,7 @@ S_get_category_index_helper(pTHX_ const int category, bool * succeeded,
1021
1021
return LC_ALL_INDEX_ ; /* Arbitrary */
1022
1022
}
1023
1023
1024
- locale_panic_via_ (Perl_form ( aTHX_ "Unknown locale category %d" , category ),
1024
+ locale_panic_via_ (form ( "Unknown locale category %d" , category ),
1025
1025
__FILE__ , caller_line );
1026
1026
NOT_REACHED ; /* NOTREACHED */
1027
1027
}
@@ -1096,7 +1096,7 @@ Perl_locale_panic(const char * msg,
1096
1096
if ( strNE (__FILE__ , higher_caller_file )
1097
1097
|| immediate_caller_line != higher_caller_line )
1098
1098
{
1099
- called_by = Perl_form ( aTHX_ "\nCalled by %s: %" LINE_Tf "\n" ,
1099
+ called_by = form ( "\nCalled by %s: %" LINE_Tf "\n" ,
1100
1100
higher_caller_file , higher_caller_line );
1101
1101
}
1102
1102
@@ -1108,15 +1108,15 @@ Perl_locale_panic(const char * msg,
1108
1108
1109
1109
const int extended_errnum = get_extended_os_errno ();
1110
1110
if (errno != extended_errnum ) {
1111
- errno_text = Perl_form ( aTHX_ "; errno=%d, $^E=%d" ,
1111
+ errno_text = form ( "; errno=%d, $^E=%d" ,
1112
1112
errno , extended_errnum );
1113
1113
}
1114
1114
else
1115
1115
1116
1116
#endif
1117
1117
1118
1118
{
1119
- errno_text = Perl_form ( aTHX_ "; errno=%d" , errno );
1119
+ errno_text = form ( "; errno=%d" , errno );
1120
1120
}
1121
1121
1122
1122
/* diag_listed_as: panic: %s */
@@ -1158,7 +1158,7 @@ Perl_locale_panic(const char * msg,
1158
1158
const char * temp = savepvn(s, len); \
1159
1159
result = savepv(override_ignored_category(i, temp)); \
1160
1160
if (action == check_that_overridden && strNE(result, temp)) { \
1161
- locale_panic_(Perl_form(aTHX_ \
1161
+ locale_panic_(form( \
1162
1162
"%s expected to be '%s', instead is '%s'", \
1163
1163
category_names[i], result, temp)); \
1164
1164
} \
@@ -1480,7 +1480,7 @@ S_parse_LC_ALL_string(pTHX_ const char * string,
1480
1480
break ;
1481
1481
}
1482
1482
1483
- msg = Perl_form ( aTHX_ "'%.*s' %s\n" ,
1483
+ msg = form ( "'%.*s' %s\n" ,
1484
1484
(int ) (display_end - display_start ),
1485
1485
display_start , msg );
1486
1486
@@ -2587,7 +2587,7 @@ S_bool_setlocale_2008_i(pTHX_
2587
2587
* now switch into it */
2588
2588
if (! uselocale (new_obj )) {
2589
2589
freelocale (new_obj );
2590
- locale_panic_ (Perl_form ( aTHX_ "(called from %" LINE_Tf "):"
2590
+ locale_panic_ (form ( "(called from %" LINE_Tf "):"
2591
2591
" bool_setlocale_2008_i: switching"
2592
2592
" into new locale failed" ,
2593
2593
caller_line ));
@@ -3142,7 +3142,7 @@ S_calculate_LC_ALL_string(pTHX_ const char ** category_locales_list,
3142
3142
}
3143
3143
3144
3144
/* If would have overflowed, panic */
3145
- locale_panic_via_ (Perl_form ( aTHX_
3145
+ locale_panic_via_ (form (
3146
3146
"Internal length calculation wrong.\n"
3147
3147
"\"%s\" was not entirely added to"
3148
3148
" \"%.*s\"; needed=%zu, had=%zu" ,
@@ -3399,22 +3399,22 @@ S_setlocale_failure_panic_via_i(pTHX_
3399
3399
const char * proxy_text = "" ;
3400
3400
if (proxy_caller_line != 0 && proxy_caller_line != immediate_caller_line )
3401
3401
{
3402
- proxy_text = Perl_form ( aTHX_ "\nCalled via %s: %" LINE_Tf ,
3402
+ proxy_text = form ( "\nCalled via %s: %" LINE_Tf ,
3403
3403
__FILE__ , proxy_caller_line );
3404
3404
}
3405
3405
if ( strNE (__FILE__ , higher_caller_file )
3406
3406
|| ( immediate_caller_line != 0
3407
3407
&& immediate_caller_line != higher_caller_line ))
3408
3408
{
3409
- proxy_text = Perl_form ( aTHX_ "%s\nCalled via %s: %" LINE_Tf ,
3409
+ proxy_text = form ( "%s\nCalled via %s: %" LINE_Tf ,
3410
3410
proxy_text , __FILE__ ,
3411
3411
immediate_caller_line );
3412
3412
}
3413
3413
3414
3414
/* 'false' in the get_displayable_string() calls makes it not think the
3415
3415
* locale is UTF-8, so just dumps bytes. Actually figuring it out can be
3416
3416
* too complicated for a panic situation. */
3417
- const char * msg = Perl_form ( aTHX_
3417
+ const char * msg = form (
3418
3418
"Can't change locale for %s (%d) from '%s' to '%s'"
3419
3419
" %s" ,
3420
3420
name , cat ,
@@ -3854,7 +3854,7 @@ S_new_ctype(pTHX_ const char *newctype, bool force)
3854
3854
"Unsupported, MB_CUR_MAX=%d\n" , mb_cur_max ));
3855
3855
3856
3856
if (! IN_LC (LC_CTYPE ) || ckWARN_d (WARN_LOCALE )) {
3857
- char * msg = Perl_form ( aTHX_
3857
+ char * msg = form (
3858
3858
"Locale '%s' is unsupported, and may hang"
3859
3859
" or crash the interpreter" ,
3860
3860
newctype );
@@ -4619,7 +4619,7 @@ S_my_setlocale_debug_string_i(pTHX_
4619
4619
# define THREAD_ARGUMENT
4620
4620
# endif
4621
4621
4622
- return Perl_form ( aTHX_
4622
+ return form (
4623
4623
"%s:%" LINE_Tf ": " THREAD_FORMAT
4624
4624
" setlocale(%s[%d], %s%s%s) returned %s%s%s\n" ,
4625
4625
@@ -4664,7 +4664,7 @@ S_toggle_locale_i(pTHX_ const locale_category_index cat_index,
4664
4664
caller_line ));
4665
4665
4666
4666
if (! locale_to_restore_to ) {
4667
- locale_panic_via_ (Perl_form ( aTHX_
4667
+ locale_panic_via_ (form (
4668
4668
"Could not find current %s locale" ,
4669
4669
category_names [cat_index ]),
4670
4670
__FILE__ , caller_line );
@@ -5084,7 +5084,7 @@ S_save_to_buffer(pTHX_ const char * string, char **buf, Size_t *buf_size)
5084
5084
/* Catch glitches. Usually this is because LC_CTYPE needs to be the same
5085
5085
* locale as whatever is being worked on */
5086
5086
if (UNLIKELY (instr (string , REPLACEMENT_CHARACTER_UTF8 ))) {
5087
- locale_panic_ (Perl_form ( aTHX_
5087
+ locale_panic_ (form (
5088
5088
"Unexpected REPLACEMENT_CHARACTER in '%s'\n%s" ,
5089
5089
string , get_LC_ALL_display ()));
5090
5090
}
@@ -5443,7 +5443,7 @@ S_my_localeconv(pTHX_ const int item)
5443
5443
5444
5444
switch (item ) {
5445
5445
default :
5446
- locale_panic_ (Perl_form ( aTHX_
5446
+ locale_panic_ (form (
5447
5447
"Unexpected item passed to my_localeconv: %d" , item ));
5448
5448
break ;
5449
5449
@@ -6603,7 +6603,7 @@ S_langinfo_sv_i(pTHX_
6603
6603
* of this bug */
6604
6604
case CODESET :
6605
6605
# endif
6606
- locale_panic_ (Perl_form ( aTHX_
6606
+ locale_panic_ (form (
6607
6607
"nl_langinfo returned empty for %ld"
6608
6608
" in supposed locale \n'%s';"
6609
6609
" which really is\n'%s'\n"
@@ -6679,7 +6679,7 @@ S_langinfo_sv_i(pTHX_
6679
6679
* represents even only the first 10 alternative digits, it
6680
6680
* will be much longer than that. So to reach here, the
6681
6681
* separator must be some other byte. */
6682
- locale_panic_ (Perl_form ( aTHX_
6682
+ locale_panic_ (form (
6683
6683
"Can't find separator in ALT_DIGITS"
6684
6684
" representation '%s' for locale '%s'" ,
6685
6685
_byte_dump_string ((U8 * ) retval ,
@@ -9030,7 +9030,7 @@ Perl_init_i18nl10n(pTHX_ int printwarn)
9030
9030
* malloc'd in the interim. We arbitrarily switch to the C locale,
9031
9031
* overridden below */
9032
9032
if (! uselocale (PL_C_locale_obj )) {
9033
- locale_panic_ (Perl_form ( aTHX_
9033
+ locale_panic_ (form (
9034
9034
"Can't uselocale(0x%p), LC_ALL supposed to"
9035
9035
" be 'C'" ,
9036
9036
PL_C_locale_obj ));
@@ -10950,7 +10950,7 @@ Perl_switch_locale_context(pTHX)
10950
10950
# ifdef USE_POSIX_2008_LOCALE
10951
10951
10952
10952
if (! uselocale (PL_cur_locale_obj )) {
10953
- locale_panic_ (Perl_form ( aTHX_
10953
+ locale_panic_ (form (
10954
10954
"Can't uselocale(0x%p), LC_ALL supposed to"
10955
10955
" be '%s'" ,
10956
10956
PL_cur_locale_obj , get_LC_ALL_display ()));
@@ -10959,7 +10959,7 @@ Perl_switch_locale_context(pTHX)
10959
10959
# elif defined(WIN32 )
10960
10960
10961
10961
if (! bool_setlocale_c (LC_ALL , PL_cur_LC_ALL )) {
10962
- locale_panic_ (Perl_form ( aTHX_ "Can't setlocale(%s)" , PL_cur_LC_ALL ));
10962
+ locale_panic_ (form ( "Can't setlocale(%s)" , PL_cur_LC_ALL ));
10963
10963
}
10964
10964
10965
10965
# endif
@@ -10991,7 +10991,7 @@ Perl_thread_locale_init(pTHX)
10991
10991
10992
10992
/* Not being able to change to the C locale is severe; don't keep
10993
10993
* going. */
10994
- locale_panic_ (Perl_form ( aTHX_
10994
+ locale_panic_ (form (
10995
10995
"Can't uselocale(0x%p), 'C'" , PL_C_locale_obj ));
10996
10996
NOT_REACHED ; /* NOTREACHED */
10997
10997
}
0 commit comments