blob: 5ab0435e0c386a5c6f56292d04e6941e21432655 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
$NetBSD: patch-aq,v 1.4 2012/10/03 19:59:47 adam Exp $
--- XSUB.h.orig 2012-08-03 17:35:26.000000000 +0000
+++ XSUB.h
@@ -102,6 +102,9 @@ is a lexical $_ in scope.
#ifndef PERL_UNUSED_VAR
# define PERL_UNUSED_VAR(x) ((void)x)
#endif
+#ifndef PERL_UNUSED_DECL
+# define PERL_UNUSED_DECL
+#endif
#define ST(off) PL_stack_base[ax + (off)]
@@ -137,18 +140,7 @@ is a lexical $_ in scope.
# define XS_INTERNAL(name) EXPORT_C STATIC XSPROTO(name)
#endif
#ifndef XS_EXTERNAL
-# if defined(HASATTRIBUTE_UNUSED) && !defined(__cplusplus)
-# define XS_EXTERNAL(name) void name(pTHX_ CV* cv __attribute__unused__)
-# define XS_INTERNAL(name) STATIC void name(pTHX_ CV* cv __attribute__unused__)
-# else
-# ifdef __cplusplus
-# define XS_EXTERNAL(name) extern "C" XSPROTO(name)
-# define XS_INTERNAL(name) static XSPROTO(name)
-# else
-# define XS_EXTERNAL(name) XSPROTO(name)
-# define XS_INTERNAL(name) STATIC XSPROTO(name)
-# endif
-# endif
+# define XS_EXTERNAL(name) void name(pTHX_ CV* cv PERL_UNUSED_DECL)
#endif
/* We do export xsub symbols by default for the public XS macro.
|