Skip to content

Commit

Permalink
perlapi: Move macro defns to where defined
Browse files Browse the repository at this point in the history
This moves the API definitions of is_ascii_string, is_invariant_string,
and is_utf8_invariant_string to the spots in the source code where each
is #defined, thus making it easier to maintain
  • Loading branch information
khwilliamson committed Jun 30, 2024
1 parent 8a9c915 commit 3480380
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 25 deletions.
8 changes: 0 additions & 8 deletions embed.fnc
Original file line number Diff line number Diff line change
Expand Up @@ -1614,8 +1614,6 @@ p |bool |io_close |NN IO *io \
|NULLOK GV *gv \
|bool is_explicit \
|bool warn_on_fail
APRTdm |bool |is_ascii_string|NN const U8 * const s \
|STRLEN len
ARTdip |Size_t |isC9_STRICT_UTF8_CHAR \
|NN const U8 * const s0 \
|NN const U8 * const e
Expand All @@ -1637,9 +1635,6 @@ dp |bool |isinfnansv |NN SV *sv
Cp |bool |_is_in_locale_category \
|const bool compiling \
|const int category
APRTdm |bool |is_invariant_string \
|NN const U8 * const s \
|STRLEN len
ARdp |I32 |is_lvalue_sub
: used to check for NULs in pathnames and other names
ARdip |bool |is_safe_syscall|NN const char *pv \
Expand Down Expand Up @@ -1702,9 +1697,6 @@ ATdip |bool |is_utf8_fixed_width_buf_loclen_flags \
CRp |bool |_is_utf8_FOO |const U8 classnum \
|NN const U8 *p \
|NN const U8 * const e
ARTdmo |bool |is_utf8_invariant_string \
|NN const U8 * const s \
|STRLEN len
ARTdip |bool |is_utf8_invariant_string_loc \
|NN const U8 * const s \
|STRLEN len \
Expand Down
2 changes: 1 addition & 1 deletion inline.h
Original file line number Diff line number Diff line change
Expand Up @@ -1310,7 +1310,7 @@ so the name C<is_utf8_invariant_string> is preferred.
See also
C<L</is_utf8_string>> and C<L</is_utf8_fixed_width_buf_flags>>.
=for apidoc_defn is_utf8_invariant_string bool|NN const U8 * const s|STRLEN len
=for apidoc_defn ARTm|bool|is_utf8_invariant_string|NN const U8 * const s|STRLEN len
=cut
Expand Down
14 changes: 0 additions & 14 deletions proto.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions utf8.h
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ typedef enum {
#define FOLD_FLAGS_NOMIX_ASCII 0x4

/*
=for apidoc_defn is_ascii_string bool|NN const U8 * const s|STRLEN len
=for apidoc_defn is_invariant_string bool|NN const U8 * const s|STRLEN len
=for apidoc_defn APRTdm|bool|is_ascii_string|NN const U8 * const s|STRLEN len
=for apidoc_defn APRTdm|bool|is_invariant_string|NN const U8 * const s|STRLEN len
=cut
*/
#define is_ascii_string(s, len) is_utf8_invariant_string(s, len)
Expand Down

0 comments on commit 3480380

Please sign in to comment.