mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-28 00:21:53 +03:00
removed a potentially uninitialized variable error fixed a deprecation
* xpath.c: removed a potentially uninitialized variable error * python/generator.py: fixed a deprecation warning * python/tests/tstLastError.py: silent the damn test when Okay ! Daniel
This commit is contained in:
@ -1,3 +1,9 @@
|
|||||||
|
Wed Aug 24 11:35:26 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
|
* xpath.c: removed a potentially uninitialized variable error
|
||||||
|
* python/generator.py: fixed a deprecation warning
|
||||||
|
* python/tests/tstLastError.py: silent the damn test when Okay !
|
||||||
|
|
||||||
Wed Aug 24 00:11:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
Wed Aug 24 00:11:16 CEST 2005 Daniel Veillard <daniel@veillard.com>
|
||||||
|
|
||||||
* SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c
|
* SAX2.c globals.c runtest.c testC14N.c testapi.c tree.c
|
||||||
|
@ -1055,7 +1055,7 @@ def buildWrappers():
|
|||||||
classes_ancestor[classname] == "xmlNode":
|
classes_ancestor[classname] == "xmlNode":
|
||||||
classes.write(" def __repr__(self):\n")
|
classes.write(" def __repr__(self):\n")
|
||||||
format = "<%s (%%s) object at 0x%%x>" % (classname)
|
format = "<%s (%%s) object at 0x%%x>" % (classname)
|
||||||
classes.write(" return \"%s\" %% (self.name, id (self))\n\n" % (
|
classes.write(" return \"%s\" %% (self.name, long(id (self)))\n\n" % (
|
||||||
format))
|
format))
|
||||||
else:
|
else:
|
||||||
txt.write("Class %s()\n" % (classname))
|
txt.write("Class %s()\n" % (classname))
|
||||||
|
@ -5,6 +5,10 @@ import libxml2
|
|||||||
|
|
||||||
class TestCase(unittest.TestCase):
|
class TestCase(unittest.TestCase):
|
||||||
|
|
||||||
|
def runTest(self):
|
||||||
|
self.test1()
|
||||||
|
self.test2()
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
libxml2.debugMemory(1)
|
libxml2.debugMemory(1)
|
||||||
|
|
||||||
@ -13,6 +17,8 @@ class TestCase(unittest.TestCase):
|
|||||||
if libxml2.debugMemory(1) != 0:
|
if libxml2.debugMemory(1) != 0:
|
||||||
libxml2.dumpMemory()
|
libxml2.dumpMemory()
|
||||||
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
|
self.fail("Memory leak %d bytes" % (libxml2.debugMemory(1),))
|
||||||
|
else:
|
||||||
|
print "OK"
|
||||||
|
|
||||||
def failUnlessXmlError(self,f,args,exc,domain,code,message,level,file,line):
|
def failUnlessXmlError(self,f,args,exc,domain,code,message,level,file,line):
|
||||||
"""Run function f, with arguments args and expect an exception exc;
|
"""Run function f, with arguments args and expect an exception exc;
|
||||||
@ -69,4 +75,8 @@ class TestCase(unittest.TestCase):
|
|||||||
line=3)
|
line=3)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
test = TestCase()
|
||||||
|
test.setUp()
|
||||||
|
test.test1()
|
||||||
|
test.test2()
|
||||||
|
test.tearDown()
|
||||||
|
2
xpath.c
2
xpath.c
@ -8931,6 +8931,8 @@ xmlXPathCompStep(xmlXPathParserContextPtr ctxt) {
|
|||||||
|
|
||||||
CHECK_ERROR;
|
CHECK_ERROR;
|
||||||
|
|
||||||
|
type = (xmlXPathTypeVal) 0;
|
||||||
|
test = (xmlXPathTestVal) 0;
|
||||||
name = xmlXPathCompNodeTest(ctxt, &test, &type, &prefix, name);
|
name = xmlXPathCompNodeTest(ctxt, &test, &type, &prefix, name);
|
||||||
if (test == 0)
|
if (test == 0)
|
||||||
return;
|
return;
|
||||||
|
Reference in New Issue
Block a user