Skip to main content.
home | support | download

Back to List Archive

Patch: API-Change in libxml2-2.6

From: Bernhard Weisshuhn <bkw(at)not-real.weisshuhn.de>
Date: Tue Nov 16 2004 - 19:22:48 GMT
Hi *,

if you are using fedora core 2 or 3 with automatic updates installed,
be prepared for lots of warnings during indexing with swish-e.
The evil geniuses at xmlsoft.org changed all conversion functions to no
longer return 0 on success (as before and still ducumented), but to
return the number of bytes processed instead. This also affects
UTF8Toisolat1(), which swish-e uses for its internal conversion.
As a result, swish-e (I checked only 2.4.2) spews lots of warnings about
failed conversions although they went fine.

The rationale for the API change is described here:
   http://bugzilla.gnome.org/show_bug.cgi?id=153937

Extremely trivial (and therefore yet untested) patch against cvs below.

regards,
bkw


Index: src/parser.c
===================================================================
RCS file: /cvsroot/swishe/swish-e/src/parser.c,v
retrieving revision 1.42.2.2
diff -u -r1.42.2.2 parser.c
--- src/parser.c	23 Sep 2002 13:24:37 -0000	1.42.2.2
+++ src/parser.c	16 Nov 2004 19:16:37 -0000
@@ -866,7 +866,7 @@
         if ( used > 0 )         // tally up total bytes consumed
             buf->cur += used;
 
-        if ( ret == 0 )         // all done
+        if ( ret >= 0 )         // all done
             return;
 
         if ( ret == -2 )        // encoding failed
Received on Tue Nov 16 11:22:55 2004