This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Mark is_ascii_string() as requiring looking at return value
authorKarl Williamson <khw@cpan.org>
Tue, 25 Nov 2014 19:00:48 +0000 (12:00 -0700)
committerKarl Williamson <khw@cpan.org>
Wed, 26 Nov 2014 16:18:33 +0000 (09:18 -0700)
There's no reason to call it otherwise; there are no side effects.

embed.fnc
proto.h

index 17d3a5d..18e2757 100644 (file)
--- a/embed.fnc
+++ b/embed.fnc
@@ -698,7 +698,7 @@ ADMpPR      |bool   |is_uni_lower_lc|UV c
 ADMpPR |bool   |is_uni_print_lc|UV c
 ADMpPR |bool   |is_uni_punct_lc|UV c
 ADMpPR |bool   |is_uni_xdigit_lc|UV c
-Anpd   |bool   |is_ascii_string|NN const U8 *s|STRLEN len
+AnpdR  |bool   |is_ascii_string|NN const U8 *s|STRLEN len
 AnpdD  |STRLEN |is_utf8_char   |NN const U8 *s
 Abmnpd |STRLEN |is_utf8_char_buf|NN const U8 *buf|NN const U8 *buf_end
 Anpd   |bool   |is_utf8_string |NN const U8 *s|STRLEN len
diff --git a/proto.h b/proto.h
index 01e6a22..aabb5c5 100644 (file)
--- a/proto.h
+++ b/proto.h
@@ -1869,6 +1869,7 @@ PERL_CALLCONV bool        Perl_isIDFIRST_lazy(pTHX_ const char* p)
        assert(p)
 
 PERL_CALLCONV bool     Perl_is_ascii_string(const U8 *s, STRLEN len)
+                       __attribute__warn_unused_result__
                        __attribute__nonnull__(1);
 #define PERL_ARGS_ASSERT_IS_ASCII_STRING       \
        assert(s)