summaryrefslogtreecommitdiff
path: root/XSUB.h
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2006-08-17 22:16:09 +0300
committerSteve Peters <steve@fisharerojo.org>2006-08-17 20:28:36 +0000
commita0c21aa16d2e2969e7469365a39ad48179751e84 (patch)
treea91a58eecb71088ce15c80e1d7cf743e728161b2 /XSUB.h
parentc45598c5c02384ee183c07ababc5e058b2284e17 (diff)
downloadperl-a0c21aa16d2e2969e7469365a39ad48179751e84.tar.gz
Re: A large-ish C++ TODO (Re: [PATCH] g++ stage 1 reached)
Message-ID: <44E49649.9090307@iki.fi> p4raw-id: //depot/perl@28734
Diffstat (limited to 'XSUB.h')
-rw-r--r--XSUB.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/XSUB.h b/XSUB.h
index 580d639c07..51112a944e 100644
--- a/XSUB.h
+++ b/XSUB.h
@@ -107,7 +107,11 @@ is a lexical $_ in scope.
# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
# define XS(name) void name(pTHX_ CV* cv __attribute__unused__)
# else
-# define XS(name) void name(pTHX_ CV* cv)
+# ifdef __cplusplus
+# define XS(name) extern "C" void name(pTHX_ CV* cv)
+# else
+# define XS(name) void name(pTHX_ CV* cv)
+# endif
# endif
#endif