This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
op.c: One less func call for newXS
authorFather Chrysostomos <sprout@cpan.org>
Wed, 23 May 2012 03:46:52 +0000 (20:46 -0700)
committerFather Chrysostomos <sprout@cpan.org>
Wed, 23 May 2012 07:56:10 +0000 (00:56 -0700)
newXS calls newXS_flags, which calls newXS_len_flags.  This commit
makes newXS call the underlying function directly.

op.c

diff --git a/op.c b/op.c
index f1d0261..94b9281 100644 (file)
--- a/op.c
+++ b/op.c
@@ -7124,7 +7124,9 @@ CV *
 Perl_newXS(pTHX_ const char *name, XSUBADDR_t subaddr, const char *filename)
 {
     PERL_ARGS_ASSERT_NEWXS;
-    return newXS_flags(name, subaddr, filename, NULL, 0);
+    return newXS_len_flags(
+       name, name ? strlen(name) : 0, subaddr, filename, NULL, NULL, 0
+    );
 }
 
 #ifdef PERL_MAD