summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicholas Clark <nick@ccl4.org>2013-06-12 19:48:37 +0200
committerZefram <zefram@fysh.org>2013-08-17 16:47:37 +0100
commitb1cb0d6f94be7e34f1ce95a367ac84bd03f93bd4 (patch)
treee7bdebb0a9de03c5cb78aab19b1ad9961372bccb
parent07f43755f921a0932e6f0968eef6a88c15c70dae (diff)
downloadperl-b1cb0d6f94be7e34f1ce95a367ac84bd03f93bd4.tar.gz
In Cwd's THX_unix_canonpath add two casts from (void*) to keep C++ sweet.
The new XS implementation of various File::Spec methods needs a couple of casts to compile with a C++ compiler.
-rw-r--r--dist/Cwd/Cwd.xs4
1 files changed, 2 insertions, 2 deletions
diff --git a/dist/Cwd/Cwd.xs b/dist/Cwd/Cwd.xs
index a18afd1440..dc3da184f6 100644
--- a/dist/Cwd/Cwd.xs
+++ b/dist/Cwd/Cwd.xs
@@ -457,7 +457,7 @@ THX_unix_canonpath(pTHX_ SV *path)
#endif
o = SvPVX(retval);
if(DOUBLE_SLASHES_SPECIAL && p[0] == '/' && p[1] == '/' && p[2] != '/') {
- q = memchr(p+2, '/', pe-(p+2));
+ q = (const char *) memchr(p+2, '/', pe-(p+2));
if(!q) q = pe;
l = q - p;
memcpy(o, p, l);
@@ -493,7 +493,7 @@ THX_unix_canonpath(pTHX_ SV *path)
}
if(p == pe) goto end;
while(1) {
- q = memchr(p, '/', pe-p);
+ q = (const char *) memchr(p, '/', pe-p);
if(!q) q = pe;
l = q - p;
memcpy(o, p, l);