summaryrefslogtreecommitdiff
path: root/ext/List/Util/Util.xs
diff options
context:
space:
mode:
Diffstat (limited to 'ext/List/Util/Util.xs')
-rw-r--r--ext/List/Util/Util.xs21
1 files changed, 21 insertions, 0 deletions
diff --git a/ext/List/Util/Util.xs b/ext/List/Util/Util.xs
index 3a03488197..790a2b9af4 100644
--- a/ext/List/Util/Util.xs
+++ b/ext/List/Util/Util.xs
@@ -103,6 +103,24 @@ sv_tainted(SV *sv)
# define PTR2UV(ptr) (UV)(ptr)
#endif
+#ifdef HASATTRIBUTE
+# if (defined(__GNUC__) && defined(__cplusplus)) || defined(__INTEL_COMPILER)
+# define PERL_UNUSED_DECL
+# else
+# define PERL_UNUSED_DECL __attribute__((unused))
+# endif
+#else
+# define PERL_UNUSED_DECL
+#endif
+
+#ifndef dNOOP
+#define dNOOP extern int Perl___notused PERL_UNUSED_DECL
+#endif
+
+#ifndef dVAR
+#define dVAR dNOOP
+#endif
+
MODULE=List::Util PACKAGE=List::Util
void
@@ -206,6 +224,7 @@ reduce(block,...)
PROTOTYPE: &@
CODE:
{
+ dVAR;
SV *ret = sv_newmortal();
int index;
GV *agv,*bgv,*gv;
@@ -261,6 +280,7 @@ first(block,...)
PROTOTYPE: &@
CODE:
{
+ dVAR;
int index;
GV *gv;
HV *stash;
@@ -315,6 +335,7 @@ shuffle(...)
PROTOTYPE: @
CODE:
{
+ dVAR;
int index;
struct op dmy_op;
struct op *old_op = PL_op;