fix for AttributeList_getValue
Philip Garrett <[email protected]> Thu, 11 Nov 2004 13:52:51 -0500
| Newsgroups | gmane.text.xml.xerces-p.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi,
I still had the "No matching function for overloaded 'AttributeList_getValue'"
problem with XML::Xerces v. 2.5.0-0 on my Solaris machine, so I did a
little digging on my own.
Bug report: http://tinyurl.com/6dcrx
Mail thread: http://tinyurl.com/5oglo
The arithmetic '+' in the for loop is turning $i into a
double-precision value instead of an integer. I don't know how you
would get SWIG to automatically do this when it's generating code, but
if you change SvIOK to SvNIOK in the XSUB, it works beautifully. (see
patch below)
In a pinch, you could change the to_hash() method to use "$i = int($i
+ 1)" instead of "$i++", but that would only mask the symptom.
Hope this helps,
Philip
$ gcc -v
Reading specs from /usr/local/lib/gcc-lib/sparc-sun-solaris2.8/2.95.2/specs
gcc version 2.95.2 19991024 (release)
$ uname -a
SunOS dev 5.8 Generic_108528-23 sun4u sparc
--- Xerces.cpp.orig 2004-11-11 11:35:18.918460000 -0500
+++ Xerces.cpp 2004-11-11 11:36:23.368872000 -0500
@@ -34473,5 +34473,5 @@
if (_v) {
{
- _v = SvIOK(ST(1)) ? 1 : 0;
+ _v = SvNIOK(ST(1)) ? 1 : 0;
}
if (_v) {