Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

regexp in t/porting/args_assert.t insufficient #10176

Closed
p5pRT opened this issue Feb 14, 2010 · 4 comments
Closed

regexp in t/porting/args_assert.t insufficient #10176

p5pRT opened this issue Feb 14, 2010 · 4 comments

Comments

@p5pRT
Copy link

p5pRT commented Feb 14, 2010

Migrated from rt.perl.org#72800 (status was 'resolved')

Searchable as RT72800$

@p5pRT
Copy link
Author

p5pRT commented Feb 14, 2010

From @nwc10

The regexp in t/porting/args_assert.t is insufficient - it fails to spot
function names containing digits. The appended patch fixes it, and adds in
the 3 macros that were missing.

Given that 2 of the functions are static, and the third is in mathoms.c, I
don't think that the lack of these macros has materially dropped our coverage
testing for incorrect "not NULL" annotations.

Nicholas Clark

Inline Patch
diff --git a/mathoms.c b/mathoms.c
index 626bbb3..7c680e7 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -162,6 +162,7 @@ use the macro wrapper C<SvPV_nolen(sv)> instead.
 char *
 Perl_sv_2pv_nolen(pTHX_ register SV *sv)
 {
+    PERL_ARGS_ASSERT_SV_2PV_NOLEN;
     return sv_2pv(sv, NULL);
 }
 
diff --git a/t/porting/args_assert.t b/t/porting/args_assert.t
index 95c24f4..df62755 100644
--- a/t/porting/args_assert.t
+++ b/t/porting/args_assert.t
@@ -26,7 +26,7 @@ unless (-d 't' && -f 'MANIFEST') {
     open my $fh, '<', $proto or die "Can't open $proto: $!";
 
     while (<$fh>) {
-	$declared{$1}++ if /^#define\s+(PERL_ARGS_ASSERT[A-Za-z_]+)\s+/;
+	$declared{$1}++ if /^#define\s+(PERL_ARGS_ASSERT[A-Za-z0-9_]+)\s+/;
     }
 }
 
@@ -42,7 +42,7 @@ if (!@ARGV) {
 }
 
 while (<>) {
-    $used{$1}++ if /^\s+(PERL_ARGS_ASSERT_[A-Za-z_]+);$/;
+    $used{$1}++ if /^\s+(PERL_ARGS_ASSERT_[A-Za-z0-9_]+);$/;
 }
 
 my %unused;
diff --git a/toke.c b/toke.c
index 9df0ff2..34139b0 100644
--- a/toke.c
+++ b/toke.c
@@ -13435,6 +13435,8 @@ S_utf16_textfilter(pTHX_ int idx, SV *sv, int maxlen)
     const bool reverse = (bool) IoLINES(filter);
     I32 retval;
 
+    PERL_ARGS_ASSERT_UTF16_TEXTFILTER;
+
     /* As we're automatically added, at the lowest level, and hence only called
        from this file, we can be sure that we're not called in block mode. Hence
        don't bother writing code to deal with block mode.  */
@@ -13548,6 +13550,8 @@ S_add_utf16_textfilter(pTHX_ U8 *const s, bool reversed)
 {
     SV *filter = filter_add(S_utf16_textfilter, NULL);
 
+    PERL_ARGS_ASSERT_ADD_UTF16_TEXTFILTER;
+
     IoTOP_GV(filter) = MUTABLE_GV(newSVpvn((char *)s, PL_bufend - (char*)s));
     sv_setpvs(filter, "");
     IoLINES(filter) = reversed;

@p5pRT
Copy link
Author

p5pRT commented May 29, 2010

From @nwc10

Applied in c85ae79

@p5pRT
Copy link
Author

p5pRT commented May 29, 2010

From [Unknown Contact. See original ticket]

Applied in c85ae79

@p5pRT
Copy link
Author

p5pRT commented May 29, 2010

@nwc10 - Status changed from 'new' to 'resolved'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant