Skip Menu |
 

This queue is for tickets about the Devel-Declare CPAN distribution.

Report information
The Basics
Id: 73096
Status: resolved
Priority: 0/
Queue: Devel-Declare

People
Owner: Nobody in particular
Requestors: JDB [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: 0.006008
Fixed in: (no value)



Subject: Don't mix declarations with executable statements in XS code
Download (untitled) / with headers
text/plain 966b
It is not allowed by C89, and it breaks under Microsoft VC, at least for older versions. I would have sent a github pull request, but the repo seems to be out-of-date: git://github.com/rafl/devel-declare.git --- Declare.xs.orig 2011-11-05 14:47:29.000000000 -0700 +++ Declare.xs 2011-12-07 18:06:45.700971700 -0800 @@ -490,13 +490,15 @@ 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 */
Thanks. Fixed in Devel-Declare-0.006009.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.