From: Vincent Pit Date: Wed, 4 Nov 2015 23:07:09 +0000 (-0200) Subject: A few more declarations adjustments X-Git-Tag: v0.11~2 X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2Fre-engine-Plugin.git;a=commitdiff_plain;h=ac1cf0174934b284c396c3a99cf3fbdbdbc48488 A few more declarations adjustments --- diff --git a/Plugin.xs b/Plugin.xs index b06aec6..6036d87 100644 --- a/Plugin.xs +++ b/Plugin.xs @@ -192,17 +192,13 @@ Plugin_comp(pTHX_ SV * const pattern, U32 flags) Plugin_comp(pTHX_ const SV * const pattern, const U32 flags) #endif { - dSP; - struct regexp *rx; - REGEXP *RX; - - re__engine__Plugin re; const xsh_hints_user_t *h; - + REGEXP *RX; + struct regexp *rx; + re__engine__Plugin re; + char *pbuf; STRLEN plen; - char *pbuf; - - SV *obj; + SV *obj; h = rep_hint(); if (!h) /* This looks like a pragma leak. Apply the default behaviour */ @@ -264,6 +260,8 @@ Plugin_comp(pTHX_ const SV * const pattern, const U32 flags) /* Call our callback function if one was defined, if not we've already set up * all the stuff we're going to to need for subsequent exec and other calls */ if (h->comp) { + dSP; + ENTER; SAVETMPS; @@ -289,7 +287,7 @@ Plugin_exec(pTHX_ REGEXP * const RX, char *stringarg, char *strend, char *strbeg, REP_ENG_EXEC_MINEND_TYPE minend, SV *sv, void *data, U32 flags) { - struct regexp *rx; + struct regexp *rx; re__engine__Plugin self; I32 matched; @@ -366,10 +364,9 @@ Plugin_checkstr(pTHX_ REGEXP * const RX) void Plugin_free(pTHX_ REGEXP * const RX) { - struct regexp *rx; + struct regexp *rx; re__engine__Plugin self; SV *callback; - dSP; if (PL_dirty) return; @@ -380,6 +377,8 @@ Plugin_free(pTHX_ REGEXP * const RX) callback = self->cb_free; if (callback) { + dSP; + ENTER; SAVETMPS; @@ -428,7 +427,7 @@ void Plugin_numbered_buff_FETCH(pTHX_ REGEXP * const RX, const I32 paren, SV * const sv) { - struct regexp *rx; + struct regexp *rx; re__engine__Plugin self; SV *callback; @@ -472,7 +471,7 @@ void Plugin_numbered_buff_STORE(pTHX_ REGEXP * const RX, const I32 paren, SV const * const value) { - struct regexp *rx; + struct regexp *rx; re__engine__Plugin self; SV *callback; @@ -505,7 +504,7 @@ I32 Plugin_numbered_buff_LENGTH(pTHX_ REGEXP * const RX, const SV * const sv, const I32 paren) { - struct regexp *rx; + struct regexp *rx; re__engine__Plugin self; SV *callback;