Skip to content

Commit 194d4ea

Browse files
committed
perlapi: Combine is_safe_syscall, IS_SAFE_SYSCALL
1 parent 5d7576a commit 194d4ea

File tree

2 files changed

+6
-15
lines changed

2 files changed

+6
-15
lines changed

inline.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3289,9 +3289,12 @@ Perl_uv_to_utf8_flags(pTHX_ U8 *d, UV uv, UV flags)
32893289
/*
32903290
=for apidoc_section $utility
32913291
3292-
=for apidoc is_safe_syscall
3292+
=for apidoc is_safe_syscall
3293+
=for apidoc_item ||IS_SAFE_SYSCALL|
32933294
3294-
Test that the given C<pv> (with length C<len>) doesn't contain any internal
3295+
These are synonymous.
3296+
3297+
They test that the given C<pv> (with length C<len>) doesn't contain any internal
32953298
C<NUL> characters.
32963299
If it does, set C<errno> to C<ENOENT>, optionally warn using the C<syscalls>
32973300
category, and return FALSE.
@@ -3300,8 +3303,6 @@ Return TRUE if the name is safe.
33003303
33013304
C<what> and C<op_name> are used in any warning.
33023305
3303-
Used by the C<IS_SAFE_SYSCALL()> macro.
3304-
33053306
=cut
33063307
*/
33073308

perl.h

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8411,17 +8411,7 @@ so no C<x++>.
84118411
#endif
84128412

84138413

8414-
/*
8415-
=for apidoc_section $utility
8416-
8417-
=for apidoc Am|bool|IS_SAFE_SYSCALL|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name
8418-
8419-
Same as L</is_safe_syscall>.
8420-
8421-
=cut
8422-
8423-
Allows one ending \0
8424-
*/
8414+
/* Allows one ending \0 */
84258415
#define IS_SAFE_SYSCALL(p, len, what, op_name) (Perl_is_safe_syscall(aTHX_ (p), (len), (what), (op_name)))
84268416

84278417
#define IS_SAFE_PATHNAME(p, len, op_name) IS_SAFE_SYSCALL((p), (len), "pathname", (op_name))

0 commit comments

Comments
 (0)