From: Vincent Pit Date: Wed, 4 Nov 2015 17:10:30 +0000 (-0200) Subject: Explicitely state how many values are returned from our XSUBs X-Git-Tag: v0.11~11 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=dd23df388456b3823b8f29909e781039a63361e9;p=perl%2Fmodules%2Fre-engine-Plugin.git Explicitely state how many values are returned from our XSUBs --- diff --git a/Plugin.xs b/Plugin.xs index 10a01ae..7655326 100644 --- a/Plugin.xs +++ b/Plugin.xs @@ -584,11 +584,13 @@ void pattern(re::engine::Plugin self, ...) PPCODE: XPUSHs(self->pattern); + XSRETURN(1); void str(re::engine::Plugin self, ...) PPCODE: XPUSHs(self->str); + XSRETURN(1); void mod(re::engine::Plugin self) @@ -626,6 +628,7 @@ PPCODE: XSRETURN_EMPTY; } else { XPUSHs(self->stash); + XSRETURN(1); } void @@ -640,6 +643,7 @@ PPCODE: } else { XPUSHs(sv_2mortal(&PL_sv_undef)); } + XSRETURN(1); } void @@ -654,6 +658,7 @@ PPCODE: } else { XPUSHs(sv_2mortal(&PL_sv_undef)); } + XSRETURN(1); } void @@ -668,6 +673,7 @@ PPCODE: } else { XPUSHs(sv_2mortal(&PL_sv_undef)); } + XSRETURN(1); } void @@ -678,6 +684,7 @@ PPCODE: self->cb_exec = ST(1); SvREFCNT_inc_simple_void(self->cb_exec); } + XSRETURN(0); void _num_capture_buff_FETCH(re::engine::Plugin self, ...) @@ -687,6 +694,7 @@ PPCODE: self->cb_num_capture_buff_FETCH = ST(1); SvREFCNT_inc_simple_void(self->cb_num_capture_buff_FETCH); } + XSRETURN(0); void _num_capture_buff_STORE(re::engine::Plugin self, ...) @@ -696,6 +704,7 @@ PPCODE: self->cb_num_capture_buff_STORE = ST(1); SvREFCNT_inc_simple_void(self->cb_num_capture_buff_STORE); } + XSRETURN(0); void _num_capture_buff_LENGTH(re::engine::Plugin self, ...) @@ -705,6 +714,7 @@ PPCODE: self->cb_num_capture_buff_LENGTH = ST(1); SvREFCNT_inc_simple_void(self->cb_num_capture_buff_LENGTH); } + XSRETURN(0); SV * _tag(SV *comp, SV *exec) @@ -721,3 +731,4 @@ void ENGINE() PPCODE: XPUSHs(sv_2mortal(newSViv(PTR2IV(&engine_plugin)))); + XSRETURN(1);