X-Git-Url: https://perl5.git.perl.org/perl5.git/blobdiff_plain/d78a5caa85b65d42bbf69df8d66aca78bcfdc3cf..162895999cd068ce38d5ba3165ef0dfc6828e9df:/perl.h?ds=sidebyside diff --git a/perl.h b/perl.h index 4a98718..b1ab81d 100644 --- a/perl.h +++ b/perl.h @@ -533,12 +533,25 @@ #endif /* - * STMT_START { statements; } STMT_END; - * can be used as a single statement, as in - * if (x) STMT_START { ... } STMT_END; else ... - * - * Trying to select a version that gives no warnings... - */ +=head1 Miscellaneous Functions + +=for apidoc AmnUu|void|STMT_START + + STMT_START { statements; } STMT_END; + +can be used as a single statement, as in + + if (x) STMT_START { ... } STMT_END; else ... + +These are often used in macro definitions. Note that you can't return a value +out of them. + +=for apidoc AmnUhu|void|STMT_END + +=cut + + Trying to select a version that gives no warnings... +*/ #if !(defined(STMT_START) && defined(STMT_END)) # ifdef PERL_USE_GCC_BRACE_GROUPS # define STMT_START (void)( /* gcc supports "({ STATEMENTS; })" */ @@ -6232,7 +6245,7 @@ the plain locale pragma without a parameter (S>) is in effect. # if defined (PERL_CORE) || defined (PERL_IN_XSUB_RE) /* This internal macro should be called from places that operate under - * locale rules. It there is a problem with the current locale that + * locale rules. If there is a problem with the current locale that * hasn't been raised yet, it will output a warning this time. Because * this will so rarely be true, there is no point to optimize for time; * instead it makes sense to minimize space used and do all the work in @@ -6556,7 +6569,7 @@ expression, but with an empty argument list, like this: ... } -=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED +=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED|block This macro invokes the supplied statement or block within the context of a L .. L pair @@ -6579,7 +6592,7 @@ is equivalent to: #endif } -=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED_IN|bool in_lc_numeric +=for apidoc Am|void|WITH_LC_NUMERIC_SET_TO_NEEDED_IN|bool in_lc_numeric|block Same as L with in_lc_numeric provided as the precalculated value of C. It is the caller's @@ -7192,9 +7205,19 @@ so no C. # define do_aexec(really, mark,sp) do_aexec5(really, mark, sp, 0, 0) #endif -/* check embedded \0 characters in pathnames passed to syscalls, - but allow one ending \0 */ -#define IS_SAFE_SYSCALL(p, len, what, op_name) (S_is_safe_syscall(aTHX_ (p), (len), (what), (op_name))) + +/* +=head1 Miscellaneous Functions + +=for apidoc Am|bool|IS_SAFE_SYSCALL|NN const char *pv|STRLEN len|NN const char *what|NN const char *op_name + +Same as L. + +=cut + +Allows one ending \0 +*/ +#define IS_SAFE_SYSCALL(p, len, what, op_name) (Perl_is_safe_syscall(aTHX_ (p), (len), (what), (op_name))) #define IS_SAFE_PATHNAME(p, len, op_name) IS_SAFE_SYSCALL((p), (len), "pathname", (op_name))