Streamline away unnecessary arguments.
Project: http://git-wip-us.apache.org/repos/asf/lucy/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/4b1984fb Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/4b1984fb Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/4b1984fb Branch: refs/heads/master Commit: 4b1984fbcdcc2853e7366caa5b9d200a61658a81 Parents: 54e5918 Author: Marvin Humphrey <[email protected]> Authored: Wed Nov 14 20:14:15 2012 -0800 Committer: Marvin Humphrey <[email protected]> Committed: Fri Nov 16 16:54:16 2012 -0800 ---------------------------------------------------------------------- perl/lib/Lucy.pm | 4 ++-- perl/xs/Lucy/Analysis/RegexTokenizer.c | 5 ++--- perl/xs/Lucy/Store/FSFolder.c | 3 +-- 3 files changed, 5 insertions(+), 7 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy/blob/4b1984fb/perl/lib/Lucy.pm ---------------------------------------------------------------------- diff --git a/perl/lib/Lucy.pm b/perl/lib/Lucy.pm index 537572e..bb6b6ba 100644 --- a/perl/lib/Lucy.pm +++ b/perl/lib/Lucy.pm @@ -93,7 +93,7 @@ sub error {$Clownfish::Err::error} our $VERSION = '0.003000'; $VERSION = eval $VERSION; - sub compile_token_re { return qr/$_[1]/ } + sub _compile_token_re {qr/$_[0]/} sub new { my ( $either, %args ) = @_; @@ -435,7 +435,7 @@ sub error {$Clownfish::Err::error} our $VERSION = '0.003000'; $VERSION = eval $VERSION; use File::Spec::Functions qw( rel2abs ); - sub absolutify { return rel2abs( $_[1] ) } + sub _absolutify {rel2abs(shift)} } { http://git-wip-us.apache.org/repos/asf/lucy/blob/4b1984fb/perl/xs/Lucy/Analysis/RegexTokenizer.c ---------------------------------------------------------------------- diff --git a/perl/xs/Lucy/Analysis/RegexTokenizer.c b/perl/xs/Lucy/Analysis/RegexTokenizer.c index 274b347..a1dd905 100644 --- a/perl/xs/Lucy/Analysis/RegexTokenizer.c +++ b/perl/xs/Lucy/Analysis/RegexTokenizer.c @@ -65,12 +65,11 @@ S_compile_token_re(const cfish_CharBuf *pattern) { dSP; ENTER; SAVETMPS; - EXTEND(SP, 2); + EXTEND(SP, 1); PUSHMARK(SP); - PUSHmortal; XPUSHs(XSBind_cb_to_sv(pattern)); PUTBACK; - call_pv("Lucy::Analysis::RegexTokenizer::compile_token_re", G_SCALAR); + call_pv("Lucy::Analysis::RegexTokenizer::_compile_token_re", G_SCALAR); SPAGAIN; SV *token_re_sv = POPs; SvREFCNT_inc(token_re_sv); http://git-wip-us.apache.org/repos/asf/lucy/blob/4b1984fb/perl/xs/Lucy/Store/FSFolder.c ---------------------------------------------------------------------- diff --git a/perl/xs/Lucy/Store/FSFolder.c b/perl/xs/Lucy/Store/FSFolder.c index 433d6b7..10d581c 100644 --- a/perl/xs/Lucy/Store/FSFolder.c +++ b/perl/xs/Lucy/Store/FSFolder.c @@ -24,10 +24,9 @@ lucy_FSFolder_absolutify(const cfish_CharBuf *path) { SAVETMPS; EXTEND(SP, 2); PUSHMARK(SP); - PUSHmortal; mPUSHs(XSBind_cb_to_sv(path)); PUTBACK; - call_pv("Lucy::Store::FSFolder::absolutify", G_SCALAR); + call_pv("Lucy::Store::FSFolder::_absolutify", G_SCALAR); SPAGAIN; cfish_CharBuf *absolutified = (cfish_CharBuf*)XSBind_perl_to_cfish(POPs);
