From: Florian Ragwitz Date: Wed, 22 Oct 2008 18:27:57 +0000 (+0000) Subject: Update for latest B::Hooks::OP::Check API. X-Git-Tag: 0.005000~54^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=refs%2Fheads%2Fhook_op_check;p=p5sagit%2FDevel-Declare.git Update for latest B::Hooks::OP::Check API. --- diff --git a/Declare.xs b/Declare.xs index aa6cfad..537ff80 100644 --- a/Declare.xs +++ b/Declare.xs @@ -193,7 +193,7 @@ int dd_toke_skipspace(pTHX_ int offset) { /* replacement PL_check rv2cv entry */ -STATIC OP *dd_ck_rv2cv(pTHX_ OP *o) { +STATIC OP *dd_ck_rv2cv(pTHX_ OP *o, void *user_data) { OP* kid; int dd_flags; char* cb_args[6]; @@ -272,7 +272,7 @@ OP* dd_pp_entereval(pTHX) { return PL_ppaddr[OP_ENTEREVAL](aTHX); } -STATIC OP *dd_ck_entereval(pTHX_ OP *o) { +STATIC OP *dd_ck_entereval(pTHX_ OP *o, void *user_data) { if (o->op_ppaddr == PL_ppaddr[OP_ENTEREVAL]) o->op_ppaddr = dd_pp_entereval; return o; @@ -286,7 +286,7 @@ static I32 dd_filter_realloc(pTHX_ int idx, SV *sv, int maxlen) return count; } -STATIC OP *dd_ck_const(pTHX_ OP *o) { +STATIC OP *dd_ck_const(pTHX_ OP *o, void *user_data) { int dd_flags; char* s; char* name; @@ -323,9 +323,9 @@ void setup() CODE: if (!initialized++) { - hook_op_check(OP_RV2CV, dd_ck_rv2cv); - hook_op_check(OP_ENTEREVAL, dd_ck_entereval); - hook_op_check(OP_CONST, dd_ck_const); + hook_op_check(OP_RV2CV, dd_ck_rv2cv, NULL); + hook_op_check(OP_ENTEREVAL, dd_ck_entereval, NULL); + hook_op_check(OP_CONST, dd_ck_const, NULL); } filter_add(dd_filter_realloc, NULL); diff --git a/Makefile.PL b/Makefile.PL index ee03a1b..219d66b 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -8,11 +8,12 @@ name 'Devel-Declare'; all_from 'lib/Devel/Declare.pm'; requires 'Scalar::Util'; -requires 'B::Hooks::OP::Check'; +requires 'B::Hooks::OP::Check' => '0.10'; build_requires 'Test::More'; build_requires 'Scope::Guard'; +build_requires 'B::Hooks::OP::Check' => '0.10'; configure_requires 'ExtUtils::Depends'; -configure_requires 'B::Hooks::OP::Check'; +configure_requires 'B::Hooks::OP::Check' => '0.10'; postamble(<<'EOM'); $(OBJECT) : stolen_chunk_of_toke.c