This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
ext/B: use strEQs() and strEQ() in expressions
authorYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 08:49:40 +0000 (10:49 +0200)
committerYves Orton <demerphq@gmail.com>
Wed, 19 Oct 2016 11:28:00 +0000 (13:28 +0200)
ext/B/B.xs

index 0490352..0352901 100644 (file)
@@ -894,11 +894,11 @@ CODE:
  int i; 
  IV  result = -1;
  ST(0) = sv_newmortal();
- if (strncmp(name,"pp_",3) == 0)
+ if (strEQs(name,"pp_"))
    name += 3;
  for (i = 0; i < PL_maxo; i++)
   {
-   if (strcmp(name, PL_op_name[i]) == 0)
+   if (strEQ(name, PL_op_name[i]))
     {
      result = i;
      break;