summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2010-10-24 15:51:05 +0200
committerNicholas Clark <nick@ccl4.org>2010-10-24 15:51:05 +0200
commit9e380ad423cc802b5d0aaef3b223a4f53b62b307 (patch)
tree04eaefb3319d76bcda8c81f0aa42add1324bee96 /ext
parent422d053b400e15f0154beccd0cbcd57e26d0a23a (diff)
downloadperl-9e380ad423cc802b5d0aaef3b223a4f53b62b307.tar.gz
B::cchar can be implemented as an ALIAS of B::cstring.
Diffstat (limited to 'ext')
-rw-r--r--ext/B/B.xs9
1 files changed, 2 insertions, 7 deletions
diff --git a/ext/B/B.xs b/ext/B/B.xs
index 5b1688a133..138ec05747 100644
--- a/ext/B/B.xs
+++ b/ext/B/B.xs
@@ -807,14 +807,9 @@ cstring(sv)
SV * sv
ALIAS:
perlstring = 1
+ cchar = 2
PPCODE:
- PUSHs(cstring(aTHX_ sv, ix));
-
-SV *
-cchar(sv)
- SV * sv
- PPCODE:
- PUSHs(cchar(aTHX_ sv));
+ PUSHs(ix == 2 ? cchar(aTHX_ sv) : cstring(aTHX_ sv, ix));
void
threadsv_names()