summaryrefslogtreecommitdiff
path: root/mathoms.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-05-06 08:50:43 -0500
committerCraig A. Berry <craigberry@mac.com>2012-05-24 08:43:58 -0500
commitd447858807dcd6b3333ec676ebade389de5c8234 (patch)
treebe8e09c01a092ec080122a43a58ede654bce1b4b /mathoms.c
parentef5eb418bf9cb919bb2d82393f4570a790061e2e (diff)
downloadperl-d447858807dcd6b3333ec676ebade389de5c8234.tar.gz
Unmangle mathoms under C++.
In order to actually provide binary compatibility, we have to serve up these functions under the names they were known by before making their way into mathoms.c. We've always done that under C, but not C++.
Diffstat (limited to 'mathoms.c')
-rw-r--r--mathoms.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/mathoms.c b/mathoms.c
index a48777dd51..eb64c777ee 100644
--- a/mathoms.c
+++ b/mathoms.c
@@ -38,6 +38,13 @@
*/
#else
+/* Not all of these have prototypes elsewhere, so do this to get
+ * non-mangled names.
+ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
PERL_CALLCONV OP * Perl_ref(pTHX_ OP *o, I32 type);
PERL_CALLCONV void Perl_sv_unref(pTHX_ SV *sv);
PERL_CALLCONV void Perl_sv_taint(pTHX_ SV *sv);
@@ -1197,6 +1204,10 @@ Perl_to_utf8_upper(pTHX_ const U8 *p, U8* ustrp, STRLEN *lenp)
return _to_utf8_upper_flags(p, ustrp, lenp, FALSE, NULL);
}
+#ifdef __cplusplus
+}
+#endif
+
#endif /* NO_MATHOMS */
/*