summaryrefslogtreecommitdiff
path: root/dist
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2011-06-18 16:13:00 +0200
committerNicholas Clark <nick@ccl4.org>2011-06-22 16:53:51 +0200
commit2cdb8b94c5c130c7088714a29804ced08a8e1d89 (patch)
tree2d2636269f9c1a90889461937120702447d1d0c5 /dist
parent66a378bd838e42618b6b0f44d093b57e7c5bdb70 (diff)
downloadperl-2cdb8b94c5c130c7088714a29804ced08a8e1d89.tar.gz
Merge the implementation of Cwd::{fastcwd,getcwd} using ALIAS.
Diffstat (limited to 'dist')
-rw-r--r--dist/Cwd/Cwd.xs18
1 files changed, 5 insertions, 13 deletions
diff --git a/dist/Cwd/Cwd.xs b/dist/Cwd/Cwd.xs
index e42a95f01b..6f8ae569e7 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