From: Zefram Date: Thu, 8 Dec 2011 20:28:40 +0000 (+0000) Subject: fix a C declaration after statement X-Git-Tag: 0.006009~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a36413c500f8451e66a0a0720a670f0d699fa574;p=p5sagit%2FDevel-Declare.git fix a C declaration after statement --- diff --git a/Changes b/Changes index 44ec6f5..70ca955 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Changes for Devel-Declare + - Fix a C declaration after statement, which broke compatibility with + older compilers (Jan Dubois). + 0.006008 - 05 Nov 2011 - Adjust toke_scan_str logic to always leave the prefix part of linestr unchanged. diff --git a/Declare.xs b/Declare.xs index fc8e0e6..5869056 100644 --- a/Declare.xs +++ b/Declare.xs @@ -490,13 +490,15 @@ STATIC void dd_initialize(pTHX) { if (!initialized) { initialized = 1; #if DD_GROW_VIA_BLOCKHOOK - static BHK bhk; + { + static BHK bhk; #if PERL_VERSION_GE(5,13,6) - BhkENTRY_set(&bhk, bhk_start, dd_block_start); + BhkENTRY_set(&bhk, bhk_start, dd_block_start); #else /* <5.13.6 */ - BhkENTRY_set(&bhk, start, dd_block_start); + BhkENTRY_set(&bhk, start, dd_block_start); #endif /* <5.13.6 */ - Perl_blockhook_register(aTHX_ &bhk); + Perl_blockhook_register(aTHX_ &bhk); + } #else /* !DD_GROW_VIA_BLOCKHOOK */ hook_op_check(OP_ENTEREVAL, dd_ck_entereval, NULL); #endif /* !DD_GROW_VIA_BLOCKHOOK */