You are viewing a plain text version of this content. The canonical link for it is here.
Posted to p-dev@xerces.apache.org by "Harmon S. Nine" <hn...@netarx.com> on 2001/03/08 04:16:39 UTC

Re: SWIG 1.3 in CVS (please, no!)

Jason --

I just downloaded SWIG 1.3 for linux.  It looks like it's got some great 
new features.
It's also *really* alpha.  It built fine, but I had to mung some of the 
code to get "make check"
to work.

As for its interaction with the Xerces-perl build, it appears to totally 
ignore the typemaps in
Xerces.i, e.g. the one that converts perl-strings to DOMStrings.  Thus 
when strings are
passed to functions like "createElement," the module complains that 
they're not
DOMStrings, which accounts for one of the errors below.

Also, granted SWIG 1.3 is ignoring the typemaps, it does not pass 
arguments into the
perlErrorHandler properly, accounting for the segmentation faults.

Incorporating SWIG 1.3 into a xerces-perl build at the current time 
looks like a major
headache.  IMHO, a build of xerces-perl for SWIG 1.3 should be shelved 
until it is more
stable and there are docs that specify how to get it to use the 
typemaps, etc.

In the mean time, I'll take a crack at munging 
postSource.pl/postModule.pl to get them to
change the package name to XML::Xerces.

-- Harmon


Jason E. Stewart wrote:

> "Jason E. Stewart" <ja...@openinformatics.com> writes:
> 
> 
>> The following fail:
>>    LocalFileInputSource.t
>>    MemBufInputSource.t
>>    actualCast.t
>>    domTest.t
>>    perlErrorHandler.t
>> 
>> MemBufInputSource.t fails due to the following:
>> t/MemBufInputSource.Usage: new_MemBufInputSource(srcDocBytes,byteCount,bufId,adoptBuffer); at blib/lib/Xerces.pm line 2426.
>> 
>> All the rest fail because of LocalFileInputSource:
>> t/actualCast........Type error in argument 1 of new_LocalFileInputSource. Expected _p_q_const__XMLCh at blib/lib/Xerces.pm line 2396.
> 
> So part of the problem were the typemaps in Xerces.i, they didn't
> handle const pointers, so I modified the ones for LocalFileInputSource
> and MemBufInputSource. 
> 
> Now LocalFileInputSource.t works, but MemBufInputSource.t still
> fails...
> 
> actualCast now fails for a different reason:
> 
> t/actualCast........Type error in argument 2 of DOM_Document_getElementsByTagName. Expected Xerces::DOMString at blib/lib/Xerces.pm line 846.
> 
> as does domTest:
> 
> t/domTest...........Can't locate object method "createXMLDecl" via package "DOM_Document::createDocument" at testscript.pl line 32.
> 
> perlErrorHandler.t is a bit scary, because it segfaults on the call to
> $dom->parse() due to the error in the XML, if I fix the error the test
> runs fine. That means the C code is crapping out in the error handling
> routines.
> 
> jas.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-p-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-p-dev-help@xml.apache.org
> 
>