This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add new perldelta for 5.19.5
[perl5.git]
/
inline.h
diff --git
a/inline.h
b/inline.h
index
a5742b8
..
226970b
100644
(file)
--- a/
inline.h
+++ b/
inline.h
@@
-258,7
+258,7
@@
S_append_utf8_from_native_byte(const U8 byte, U8** dest)
PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE;
PERL_ARGS_ASSERT_APPEND_UTF8_FROM_NATIVE_BYTE;
- if (NATIVE_IS_INVARIANT(byte))
+ if (NATIVE_
BYTE_
IS_INVARIANT(byte))
*(*dest)++ = byte;
else {
*(*dest)++ = UTF8_EIGHT_BIT_HI(byte);
*(*dest)++ = byte;
else {
*(*dest)++ = UTF8_EIGHT_BIT_HI(byte);
@@
-288,7
+288,7
@@
S_isALNUM_lazy(pTHX_ const char* p)
/* ------------------------------- perl.h ----------------------------- */
/*
/* ------------------------------- perl.h ----------------------------- */
/*
-=for apidoc AiR|bool|is_safe_syscall|
SV *pv
|const char *what|const char *op_name
+=for apidoc AiR|bool|is_safe_syscall|
const char *pv|STRLEN len
|const char *what|const char *op_name
Test that the given C<pv> doesn't contain any internal NUL characters.
If it does, set C<errno> to ENOENT, optionally warn, and return FALSE.
Test that the given C<pv> doesn't contain any internal NUL characters.
If it does, set C<errno> to ENOENT, optionally warn, and return FALSE.
@@
-301,21
+301,20
@@
Used by the IS_SAFE_SYSCALL() macro.
*/
PERL_STATIC_INLINE bool
*/
PERL_STATIC_INLINE bool
-S_is_safe_syscall(pTHX_
SV *pv
, const char *what, const char *op_name) {
+S_is_safe_syscall(pTHX_
const char *pv, STRLEN len
, const char *what, const char *op_name) {
/* While the Windows CE API provides only UCS-16 (or UTF-16) APIs
* perl itself uses xce*() functions which accept 8-bit strings.
*/
PERL_ARGS_ASSERT_IS_SAFE_SYSCALL;
/* While the Windows CE API provides only UCS-16 (or UTF-16) APIs
* perl itself uses xce*() functions which accept 8-bit strings.
*/
PERL_ARGS_ASSERT_IS_SAFE_SYSCALL;
- if (SvPOK(pv) && SvCUR(pv) >= 1) {
- char *p = SvPVX(pv);
+ if (pv && len > 1) {
char *null_at;
char *null_at;
- if (UNLIKELY((null_at = (char *)memchr(p
, 0, SvCUR(pv)
-1)) != NULL)) {
+ if (UNLIKELY((null_at = (char *)memchr(p
v, 0, len
-1)) != NULL)) {
SETERRNO(ENOENT, LIB_INVARG);
Perl_ck_warner(aTHX_ packWARN(WARN_SYSCALLS),
"Invalid \\0 character in %s for %s: %s\\0%s",
SETERRNO(ENOENT, LIB_INVARG);
Perl_ck_warner(aTHX_ packWARN(WARN_SYSCALLS),
"Invalid \\0 character in %s for %s: %s\\0%s",
- what, op_name, p, null_at+1);
+ what, op_name, p
v
, null_at+1);
return FALSE;
}
}
return FALSE;
}
}