projects
/
p5sagit/p5-mst-13.2.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
blame
|
history
|
raw
|
HEAD
GDBM_File (wasRe: ext/ + -Wall)
[p5sagit/p5-mst-13.2.git]
/
ext
/
Cwd
/
Cwd.xs
1
#include "EXTERN.h"
2
#include "perl.h"
3
#include "XSUB.h"
4
5
MODULE = Cwd PACKAGE = Cwd
6
7
PROTOTYPES: ENABLE
8
9
void
10
fastcwd()
11
PPCODE:
12
{
13
dXSTARG;
14
sv_getcwd(TARG);
15
XSprePUSH; PUSHTARG;
16
}
17
18
void
19
abs_path(svpath=Nullsv)
20
SV *svpath
21
PPCODE:
22
{
23
dXSTARG;
24
char *path;
25
STRLEN len;
26
27
if (svpath) {
28
path = SvPV(svpath, len);
29
}
30
else {
31
path = ".";
32
len = 1;
33
}
34
35
sv_realpath(TARG, path, len);
36
XSprePUSH; PUSHTARG;
37
}