Skip to content

Commit 6277a14

Browse files
committed
Change #define Perl_foo Perl_bar" to plain "foo bar"
This reverts to the naming that prevailed until 5.41: #define foo bar The Perl_ prefixes were introduced in expectation that a scheme would be used to allow a bunch of functions to be converted to macros. This actually didn't work, so was reverted by GH #23209. However those #define changes didn't need to be reverted, so weren't A revised scheme is now being introduced in the next commit, which needs the original #define forms. So this commit reverts back to those.
1 parent 763cee0 commit 6277a14

File tree

5 files changed

+45
-45
lines changed

5 files changed

+45
-45
lines changed

embed.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@
160160
# define bytes_to_utf8(a,b) Perl_bytes_to_utf8(aTHX_ a,b)
161161
# define bytes_to_utf8_free_me(a,b,c) Perl_bytes_to_utf8_free_me(aTHX_ a,b,c)
162162
# define bytes_to_utf8_temp_pv(a,b) Perl_bytes_to_utf8_temp_pv(aTHX_ a,b)
163-
# define c9strict_utf8_to_uv Perl_c9strict_utf8_to_uv
163+
# define Perl_c9strict_utf8_to_uv c9strict_utf8_to_uv
164164
# define call_argv(a,b,c) Perl_call_argv(aTHX_ a,b,c)
165165
# define call_atexit(a,b) Perl_call_atexit(aTHX_ a,b)
166166
# define call_list(a,b) Perl_call_list(aTHX_ a,b)
@@ -225,7 +225,7 @@
225225
# define dump_vindent(a,b,c,d) Perl_dump_vindent(aTHX_ a,b,c,d)
226226
# define eval_pv(a,b) Perl_eval_pv(aTHX_ a,b)
227227
# define eval_sv(a,b) Perl_eval_sv(aTHX_ a,b)
228-
# define extended_utf8_to_uv Perl_extended_utf8_to_uv
228+
# define Perl_extended_utf8_to_uv extended_utf8_to_uv
229229
# define fbm_compile(a,b) Perl_fbm_compile(aTHX_ a,b)
230230
# define fbm_instr(a,b,c,d) Perl_fbm_instr(aTHX_ a,b,c,d)
231231
# define filter_add(a,b) Perl_filter_add(aTHX_ a,b)
@@ -312,7 +312,7 @@
312312
# define init_i18nl10n(a) Perl_init_i18nl10n(aTHX_ a)
313313
# define init_stacks() Perl_init_stacks(aTHX)
314314
# define init_tm(a) Perl_init_tm(aTHX_ a)
315-
# define instr Perl_instr
315+
# define Perl_instr instr
316316
# define intro_my() Perl_intro_my(aTHX)
317317
# define isC9_STRICT_UTF8_CHAR Perl_isC9_STRICT_UTF8_CHAR
318318
# define isSTRICT_UTF8_CHAR Perl_isSTRICT_UTF8_CHAR
@@ -328,7 +328,7 @@
328328
# define is_utf8_fixed_width_buf_loclen_flags Perl_is_utf8_fixed_width_buf_loclen_flags
329329
# define is_utf8_invariant_string_loc Perl_is_utf8_invariant_string_loc
330330
# define is_utf8_string_flags Perl_is_utf8_string_flags
331-
# define is_utf8_string_loc Perl_is_utf8_string_loc
331+
# define Perl_is_utf8_string_loc is_utf8_string_loc
332332
# define is_utf8_string_loclen Perl_is_utf8_string_loclen
333333
# define is_utf8_string_loclen_flags Perl_is_utf8_string_loclen_flags
334334
# define is_utf8_valid_partial_char_flags Perl_is_utf8_valid_partial_char_flags
@@ -651,7 +651,7 @@
651651
# define stack_grow(a,b,c) Perl_stack_grow(aTHX_ a,b,c)
652652
# define start_subparse(a,b) Perl_start_subparse(aTHX_ a,b)
653653
# define str_to_version(a) Perl_str_to_version(aTHX_ a)
654-
# define strict_utf8_to_uv Perl_strict_utf8_to_uv
654+
# define Perl_strict_utf8_to_uv strict_utf8_to_uv
655655
# define suspend_compcv(a) Perl_suspend_compcv(aTHX_ a)
656656
# define sv_2bool_flags(a,b) Perl_sv_2bool_flags(aTHX_ a,b)
657657
# define sv_2cv(a,b,c,d) Perl_sv_2cv(aTHX_ a,b,c,d)
@@ -802,26 +802,26 @@
802802
# define upg_version(a,b) Perl_upg_version(aTHX_ a,b)
803803
# define utf8_distance(a,b) Perl_utf8_distance(aTHX_ a,b)
804804
# define utf8_hop Perl_utf8_hop
805-
# define utf8_hop_back Perl_utf8_hop_back
805+
# define Perl_utf8_hop_back utf8_hop_back
806806
# define utf8_hop_back_overshoot Perl_utf8_hop_back_overshoot
807-
# define utf8_hop_forward Perl_utf8_hop_forward
807+
# define Perl_utf8_hop_forward utf8_hop_forward
808808
# define utf8_hop_forward_overshoot Perl_utf8_hop_forward_overshoot
809809
# define utf8_hop_overshoot Perl_utf8_hop_overshoot
810-
# define utf8_hop_safe Perl_utf8_hop_safe
810+
# define Perl_utf8_hop_safe utf8_hop_safe
811811
# define utf8_length(a,b) Perl_utf8_length(aTHX_ a,b)
812812
# define utf8_to_bytes(a,b) Perl_utf8_to_bytes(aTHX_ a,b)
813813
# define utf8_to_bytes_(a,b,c,d) Perl_utf8_to_bytes_(aTHX_ a,b,c,d)
814814
# define utf8_to_bytes_new_pv(a,b,c) Perl_utf8_to_bytes_new_pv(aTHX_ a,b,c)
815815
# define utf8_to_bytes_overwrite(a,b) Perl_utf8_to_bytes_overwrite(aTHX_ a,b)
816816
# define utf8_to_bytes_temp_pv(a,b) Perl_utf8_to_bytes_temp_pv(aTHX_ a,b)
817-
# define utf8_to_uv Perl_utf8_to_uv
818-
# define utf8_to_uv_errors Perl_utf8_to_uv_errors
819-
# define utf8_to_uv_flags Perl_utf8_to_uv_flags
817+
# define Perl_utf8_to_uv utf8_to_uv
818+
# define Perl_utf8_to_uv_errors utf8_to_uv_errors
819+
# define Perl_utf8_to_uv_flags utf8_to_uv_flags
820820
# define utf8_to_uv_msgs Perl_utf8_to_uv_msgs
821821
# define utf8_to_uv_msgs_helper_ Perl_utf8_to_uv_msgs_helper_
822822
# define utf8_to_uv_or_die Perl_utf8_to_uv_or_die
823-
# define utf8n_to_uvchr Perl_utf8n_to_uvchr
824-
# define utf8n_to_uvchr_error Perl_utf8n_to_uvchr_error
823+
# define Perl_utf8n_to_uvchr utf8n_to_uvchr
824+
# define Perl_utf8n_to_uvchr_error utf8n_to_uvchr_error
825825
# define utf8n_to_uvchr_msgs Perl_utf8n_to_uvchr_msgs
826826
# define uv_to_utf8(a,b) Perl_uv_to_utf8(aTHX_ a,b)
827827
# define uv_to_utf8_flags(a,b,c) Perl_uv_to_utf8_flags(aTHX_ a,b,c)

inline.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2180,8 +2180,8 @@ Perl_is_utf8_string_flags(const U8 *s, STRLEN len, const U32 flags)
21802180
return TRUE;
21812181
}
21822182

2183-
#define Perl_is_utf8_string_loc(s, len, ep) \
2184-
Perl_is_utf8_string_loclen(s, len, ep, 0)
2183+
#define is_utf8_string_loc(s, len, ep) \
2184+
is_utf8_string_loclen(s, len, ep, 0)
21852185

21862186
PERL_STATIC_INLINE bool
21872187
Perl_is_utf8_string_loclen(const U8 *s, STRLEN len, const U8 **ep, STRLEN *el)
@@ -2759,8 +2759,8 @@ unchanged.
27592759
27602760
=cut
27612761
*/
2762-
# define Perl_utf8_hop_forward( s, off, end) \
2763-
Perl_utf8_hop_forward_overshoot(s, off, end, NULL)
2762+
# define utf8_hop_forward( s, off, end) \
2763+
utf8_hop_forward_overshoot(s, off, end, NULL)
27642764

27652765
PERL_STATIC_INLINE U8 *
27662766
Perl_utf8_hop_forward_overshoot(const U8 * s, SSize_t off,
@@ -2845,8 +2845,8 @@ displaced.
28452845
=cut
28462846
*/
28472847

2848-
# define Perl_utf8_hop_back( s, off, start) \
2849-
Perl_utf8_hop_back_overshoot(s, off, start, NULL)
2848+
# define utf8_hop_back( s, off, start) \
2849+
utf8_hop_back_overshoot(s, off, start, NULL)
28502850

28512851
PERL_STATIC_INLINE U8 *
28522852
Perl_utf8_hop_back_overshoot(const U8 *s, SSize_t off,
@@ -2912,7 +2912,7 @@ the excess count is the absolute value of C<remaining>.
29122912
=cut
29132913
*/
29142914

2915-
#define Perl_utf8_hop_safe(s, o, b, e) Perl_utf8_hop_overshoot(s, o, b, e, 0)
2915+
#define utf8_hop_safe(s, o, b, e) utf8_hop_overshoot(s, o, b, e, 0)
29162916

29172917
PERL_STATIC_INLINE U8 *
29182918
Perl_utf8_hop_overshoot(const U8 *s, SSize_t off,

regen/embed.pl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -514,7 +514,7 @@ sub embed_h {
514514
if ($flags =~ /m/ && $flags =~ /p/) {
515515
my $full_name = full_name($func, $flags);
516516
next if $full_name eq $func; # Don't output a no-op.
517-
$ret = indent_define($func, $full_name, $ind);
517+
$ret = indent_define($full_name, $func, $ind);
518518
}
519519
elsif ($flags !~ /[omM]/) {
520520
my $argc = scalar @$args;

utf8.h

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -145,34 +145,34 @@ typedef enum {
145145
#define uvchr_to_utf8 uv_to_utf8
146146
#define uvchr_to_utf8_flags uv_to_utf8_flags
147147
#define uvchr_to_utf8_flags_msgs uv_to_utf8_msgs
148-
#define Perl_uvchr_to_utf8 Perl_uv_to_utf8
149-
#define Perl_uvchr_to_utf8_flags Perl_uv_to_utf8_flags
150-
#define Perl_uvchr_to_utf8_flags_msgs Perl_uv_to_utf8_msgs
148+
#define uvchr_to_utf8 uv_to_utf8
149+
#define uvchr_to_utf8_flags uv_to_utf8_flags
150+
#define uvchr_to_utf8_flags_msgs uv_to_utf8_msgs
151151

152152
/* This is needed to cast the parameters for all those calls that had them
153153
* improperly as chars */
154-
#define utf8_to_uvchr_buf(s, e, lenp) \
154+
#define utf8_to_uvchr_buf(s, e, lenp) \
155155
Perl_utf8_to_uvchr_buf(aTHX_ (const U8 *) (s), (const U8 *) e, lenp)
156156

157-
#define Perl_utf8n_to_uvchr(s, len, lenp, flags) \
158-
Perl_utf8n_to_uvchr_error(s, len, lenp, flags, 0)
159-
#define Perl_utf8n_to_uvchr_error(s, len, lenp, flags, errors) \
160-
Perl_utf8n_to_uvchr_msgs(s, len, lenp, flags, errors, 0)
161-
162-
#define Perl_utf8_to_uv( s, e, cp_p, advance_p) \
163-
Perl_utf8_to_uv_flags( s, e, cp_p, advance_p, 0)
164-
#define Perl_utf8_to_uv_flags( s, e, cp_p, advance_p, flags) \
165-
Perl_utf8_to_uv_errors( s, e, cp_p, advance_p, flags, 0)
166-
#define Perl_utf8_to_uv_errors( s, e, cp_p, advance_p, flags, errors) \
167-
Perl_utf8_to_uv_msgs( s, e, cp_p, advance_p, flags, errors, 0)
168-
#define Perl_extended_utf8_to_uv(s, e, cp_p, advance_p) \
169-
Perl_utf8_to_uv(s, e, cp_p, advance_p)
170-
#define Perl_strict_utf8_to_uv( s, e, cp_p, advance_p) \
171-
Perl_utf8_to_uv_flags( s, e, cp_p, advance_p, \
172-
UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
173-
#define Perl_c9strict_utf8_to_uv(s, e, cp_p, advance_p) \
174-
Perl_utf8_to_uv_flags( s, e, cp_p, advance_p, \
175-
UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
157+
#define utf8n_to_uvchr(s, len, lenp, flags) \
158+
utf8n_to_uvchr_error(s, len, lenp, flags, 0)
159+
#define utf8n_to_uvchr_error(s, len, lenp, flags, errors) \
160+
utf8n_to_uvchr_msgs(s, len, lenp, flags, errors, 0)
161+
162+
#define utf8_to_uv( s, e, cp_p, advance_p) \
163+
utf8_to_uv_flags( s, e, cp_p, advance_p, 0)
164+
#define utf8_to_uv_flags( s, e, cp_p, advance_p, flags) \
165+
utf8_to_uv_errors( s, e, cp_p, advance_p, flags, 0)
166+
#define utf8_to_uv_errors( s, e, cp_p, advance_p, flags, errors) \
167+
utf8_to_uv_msgs( s, e, cp_p, advance_p, flags, errors, 0)
168+
#define extended_utf8_to_uv(s, e, cp_p, advance_p) \
169+
utf8_to_uv(s, e, cp_p, advance_p)
170+
#define strict_utf8_to_uv( s, e, cp_p, advance_p) \
171+
utf8_to_uv_flags( s, e, cp_p, advance_p, \
172+
UTF8_DISALLOW_ILLEGAL_INTERCHANGE)
173+
#define c9strict_utf8_to_uv(s, e, cp_p, advance_p) \
174+
utf8_to_uv_flags( s, e, cp_p, advance_p, \
175+
UTF8_DISALLOW_ILLEGAL_C9_INTERCHANGE)
176176

177177
#define utf16_to_utf8(p, d, bytelen, newlen) \
178178
utf16_to_utf8_base(p, d, bytelen, newlen, 0, 1)

util.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ returning NULL if not found. The terminating NUL bytes are not compared.
241241
*/
242242

243243

244-
#define Perl_instr(haystack, needle) strstr(haystack, needle)
244+
#define instr(haystack, needle) strstr(haystack, needle)
245245

246246
#ifdef HAS_MEMMEM
247247
# define ninstr(big, bigend, little, lend) \

0 commit comments

Comments
 (0)