From 2cdb8b94c5c130c7088714a29804ced08a8e1d89 Mon Sep 17 00:00:00 2001 From: Nicholas Clark Date: Sat, 18 Jun 2011 16:13:00 +0200 Subject: [PATCH] Merge the implementation of Cwd::{fastcwd,getcwd} using ALIAS. --- dist/Cwd/Cwd.xs | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/dist/Cwd/Cwd.xs b/dist/Cwd/Cwd.xs index e42a95f..6f8ae56 100644 --- a/dist/Cwd/Cwd.xs +++ b/dist/Cwd/Cwd.xs @@ -401,24 +401,16 @@ MODULE = Cwd PACKAGE = Cwd PROTOTYPES: ENABLE void -fastcwd() -PROTOTYPE: DISABLE -PPCODE: -{ - dXSTARG; - getcwd_sv(TARG); - XSprePUSH; PUSHTARG; -#ifndef INCOMPLETE_TAINTS - SvTAINTED_on(TARG); -#endif -} - -void getcwd(...) PROTOTYPE: DISABLE +ALIAS: + fastcwd=1 PPCODE: { dXSTARG; + /* fastcwd takes zero parameters: */ + if (ix == 1 && items != 0) + croak_xs_usage(cv, ""); getcwd_sv(TARG); XSprePUSH; PUSHTARG; #ifndef INCOMPLETE_TAINTS -- 2.7.4