Fix warnings "variable 'ax' set but not used [-Wunused-but-set-variable]" of modperl.

http://perldoc.perl.org/perlcall.html wants us to declare and set this variable,
but it seems that not every perl actually uses it.
So let me introduce you this small workaround which uses ax's value.

Thanks to nb for reporting this.

git-svn-id: https://znc.svn.sourceforge.net/svnroot/znc/trunk@2273 726aef4b-f618-498e-8847-2d620e286838
This commit is contained in:
darthgandalf
2011-01-24 18:18:42 +00:00
parent ddd302fbf5
commit ae82eec1ac

View File

@@ -39,7 +39,7 @@ public:
#define PSTART dSP; I32 ax; int ret = 0; ENTER; SAVETMPS; PUSHMARK(SP)
#define PCALL(name) PUTBACK; ret = call_pv(name, G_EVAL|G_ARRAY); SPAGAIN; SP -= ret; ax = (SP - PL_stack_base) + 1
#define PEND PUTBACK; FREETMPS; LEAVE
#define PEND ax += 0; PUTBACK; FREETMPS; LEAVE
#define PUSH_STR(s) XPUSHs(PString(s).GetSV())
#define PUSH_PTR(type, p) XPUSHs(SWIG_NewInstanceObj(const_cast<type>(p), SWIG_TypeQuery(#type), SWIG_SHADOW))