Skip Menu |

This queue is for tickets about the XML-Bare CPAN distribution.

Report information
The Basics
Id: 45500
Status: resolved
Priority: 0/
Queue: XML-Bare

People
Owner: cpan [...] codechild.com
Requestors: sisyphus [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.43
Fixed in: 0.44



Subject: Bare.xs won't compile with many Microsoft Compilers
Hi, With some Microsoft Compilers, Bare.xs will not compile. The attached patch addresses this issue portably (ie without breaking other compilers). I think the current version of Bare.xs might build ok with Visual Studio 8.0 and later (untested), but it certainly won't build with Visual Studio 6.0 and Visual Studio 7.x (both of which are commonly used). Cheers, Rob
Subject: XML_Bare.diff
--- Bare.xs_orig Tue Apr 28 01:10:50 2009 +++ Bare.xs Tue Apr 28 01:08:04 2009 @@ -99,11 +99,11 @@ SV *newarrayref = newRV_noinc( (SV *) newarray ); SV *newref = newRV( (SV *) SvRV( *cur ) ); - + SV *ob = cxml2obj(); hv_delete( output, curnode->name, curnode->namelen, 0 ); hv_store( output, curnode->name, curnode->namelen, newarrayref, 0 ); av_push( newarray, newref ); - SV *ob = cxml2obj(); + av_push( newarray, ob ); } else { @@ -141,6 +141,9 @@ int numatts = curnode->numatt; SV *attval; SV *attatt; + HV *output = newHV(); + SV *outputref = newRV( (SV *) output ); + int length = curnode->numchildren; if( ( length + numatts ) == 0 ) { @@ -151,9 +154,6 @@ return newSViv( 1 ); //&PL_sv_undef; } - HV *output = newHV(); - SV *outputref = newRV( (SV *) output ); - if( length ) { curnode = curnode->firstchild; for( i = 0; i < length; i++ ) { @@ -273,6 +273,9 @@ c_parsefile(filename) char * filename CODE: + char *data; + unsigned long len; + FILE *handle; PERL_HASH(vhash, "value", 5); PERL_HASH(ahash, "_att", 4); PERL_HASH(chash, "comment", 7); @@ -280,9 +283,6 @@ PERL_HASH(ihash, "_i", 2 ); PERL_HASH(zhash, "_z", 2 ); PERL_HASH(cdhash, "_cdata", 6 ); - char *data; - unsigned long len; - FILE *handle; handle = fopen(filename,"r"); fseek( handle, 0, SEEK_END );
I have no problem with these patches. I made similar changes in order to allow building on 7.1 ( .NET 03 ) I simply never tested earlier versions of Visual Studio. I will implement these patches soon and resolve this ticket when the new version has been released. I -wish- there were some easy way to resolved the VC9 problems as well, but I have yet to find a solution that can be packaged ( the manifest must be added manually for the linking process to work in VC9 due to a Make::Maker glitch. ) Thank you for taking the time to submit a ticket for this so that I know there is a problem. On Mon Apr 27 22:25:11 2009, SISYPHUS wrote: Show quoted text
> Hi, > With some Microsoft Compilers, Bare.xs will not compile. The attached > patch addresses this issue portably (ie without breaking other > compilers). > > I think the current version of Bare.xs might build ok with Visual > Studio 8.0 and later (untested), but it certainly won't build with > Visual Studio 6.0 and Visual Studio 7.x (both of which are commonly > used). > > Cheers, > Rob
Version 0.44 has now been released and it resolves these issues. The module should compile properly with the latest MS compilers.