From: J.R. Mash Date: Tue, 19 Aug 2014 18:26:54 +0000 (-0700) Subject: MSVC Compiler Compatibility X-Git-Tag: v0.11-TRIAL~3^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a89f397501b19e49c27ef597edace8498ed6875d;p=p5sagit%2FSub-Name.git MSVC Compiler Compatibility Move variable declaration to the beginning of the block, for better C90 compliance. Should compile now in MSVC. --- diff --git a/Name.xs b/Name.xs index d7fd127..0c99536 100644 --- a/Name.xs +++ b/Name.xs @@ -71,7 +71,8 @@ subname(name, sub) /* under debugger, provide information about sub location */ if (PL_DBsub && CvGV(cv)) { HV *hv = GvHV(PL_DBsub); - + SV** old_data; + char* new_pkg = HvNAME(stash); char* old_name = GvNAME( CvGV(cv) ); @@ -87,7 +88,7 @@ subname(name, sub) strcat(full_name, "::"); strcat(full_name, old_name); - SV** old_data = hv_fetch(hv, full_name, strlen(full_name), 0); + old_data = hv_fetch(hv, full_name, strlen(full_name), 0); if (old_data) { strcpy(full_name, new_pkg);