[Expat-bugs] [Bug #116381] XML_SetEndNamespaceDeclHandler()

noreply@sourceforge.net noreply@sourceforge.net
Mon, 9 Oct 2000 07:27:37 -0700


Bug #116381, was updated on 2000-Oct-08 13:50
Here is a current snapshot of the bug.

Project: Expat XML Parser
Category: None
Status: Closed
Resolution: Works For Me
Bug Group: None
Priority: 5
Summary: XML_SetEndNamespaceDeclHandler()

Details: 
In xmlparse.c:1002 there is no procedure defined.


Follow-Ups:

Date: 2000-Oct-09 05:31
By: coopercc

Comment:
This function (XML_SetEndNamespaceDeclHandler) is defined in xmlparse.c and is declared in expat.h. So if the submitter of this bug is encountering some other problem, they will have to give us more than a 7 line sentence in order to get our attention.
-------------------------------------------------------

Date: 2000-Oct-09 07:27
By: OdinOdin_

Comment:
The anonymous coward is revealed :)

$ uname -a
Linux testhost 2.2.11 #2 SMP Sat Aug 14 16:52:02 BST 1999 i686 unknown
$ tar -zxvf expat-1.95.0.tar.gz
$ cd expat-1.95.0
$ ./configure
$ make
$ nm lib/.libs/libexpat.a | grep XML_SetEndName
$ nm lib/.libs/libexpat.so | grep XML_SetEndName
$ grep -A2 -B2 XML_SetEndName lib/expat.h

void XMLPARSEAPI
XML_SetEndNamespaceDeclHandler(XML_Parser parser,
                          XML_EndNamespaceDeclHandler end);

$ grep -A2 -B1 XML_SetEndName lib/xmlparse.c

void XML_SetEndNamespaceDeclHandler(XML_Parser parser,
                          XML_EndNamespaceDeclHandler end);
$


The other symbols are in there:

$ nm lib/.libs/libexpat.a | grep XML_SetName
000009dc T XML_SetNamespaceDeclHandler
$ nm lib/.libs/libexpat.a | grep XML_SetStartName
000009f4 T XML_SetStartNamespaceDeclHandler

There is no hard symbol for the function.

I wonder if 'coopercc' is confusing the function type (XML_EndNamespaceDeclHandler) with the real function XML_SetEndNamespaceDeclHandler() which as I still claim for 1.95.0 at line 1002 of xmlparse.c has no "definition", it you actualy look at that line you will see a "declaration" there.

Does this (mangled :) patch help?

--- lib/xmlparse.c      Fri Sep 29 16:54:53 2000
+++ ../../expat-1.95.0/lib/xmlparse.c   Sun Oct  8 22:08:15 2000
@@ -999,8 +999,10 @@
 }

 void XML_SetEndNamespaceDeclHandler(XML_Parser parser,
-                                   XML_EndNamespaceDeclHandler end);
-
+                                   XML_EndNamespaceDeclHandler end)
+{
+  endNamespaceDeclHandler = end;
+}

 void XML_SetNotStandaloneHandler(XML_Parser parser,
                                 XML_NotStandaloneHandler handler)

-------------------------------------------------------

For detailed info, follow this link:
http://sourceforge.net/bugs/?func=detailbug&bug_id=116381&group_id=10127