Subject: | patch for broken win32 compile in 0.61 |
MS compiler needs variable declarations at the top of a function
Subject: | perl_syck.h.diff |
--- C:\src\cpan\build\YAML-Syck-0.61\perl_syck.h Sun Jul 02 00:01:44 2006
+++ C:\src\cpan\build\YAML-Syck-0.61\perl_syck.h Sun Jul 02 17:22:13 2006
@@ -184,6 +184,7 @@
} else if (load_code && (strEQ(id, "perl/code") || strnEQ(id, "perl/code:", 10))) {
SV *cv;
SV *text, *sub;
+ char *pkg;
/* This code is copypasted from Storable.xs */
@@ -210,7 +211,7 @@
croak("code %s did not evaluate to a subroutine reference\n", SvPV_nolen(sub));
}
- char *pkg = id + 10;
+ pkg = id + 10;
if ( *pkg != '\0' ) {
sv_bless(sv, gv_stashpv(pkg, TRUE));
}
@@ -296,10 +297,12 @@
SV* key = perl_syck_lookup_sym(p, syck_map_read(n, map_key, 0));
SV* val = perl_syck_lookup_sym(p, syck_map_read(n, map_value, 0));
+ char *ref_type;
+
sv = newRV_noinc(val);
USE_OBJECT(val);
- char *ref_type = SvPVX(key);
+ ref_type = SvPVX(key);
if (strnNE(ref_type, REF_LITERAL, REF_LITERAL_LENGTH+1)) { /* handle the weird audrey scalar ref stuff */
sv_bless(sv, gv_stashpv(ref_type, TRUE));