]> git.vpit.fr Git - perl/modules/re-engine-Plugin.git/commitdiff
Explicitely state how many values are returned from our XSUBs
authorVincent Pit <perl@profvince.com>
Wed, 4 Nov 2015 17:10:30 +0000 (15:10 -0200)
committerVincent Pit <perl@profvince.com>
Wed, 4 Nov 2015 23:57:56 +0000 (21:57 -0200)
Plugin.xs

index 10a01ae68abc7a8b54dcc6b896eaf333a3e8f9ea..7655326eb4eb6ad6dbfbd73c7ce9663f4447dc53 100644 (file)
--- 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);