summaryrefslogtreecommitdiff
path: root/python/libxml.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix typos: dictio{ nn -> n }ar{y,ies}Jan Pokorný2016-04-151-1/+1
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* python: Fix compiler warnings when building python3 bindingsArmin K2013-06-031-2/+2
|
* Fix missing break on last() function for attributesdcb2013-05-021-0/+1
| | | | pointed out by cppcheck
* Fix compilation on Python3Daniel Veillard2013-03-301-53/+140
| | | | | | | | | | | | | | | | while still compiling on recent Python2: - change the handling of files, tweak the generator, get the fd instead of the FILE *, dup it and fdopen based on mode, add a Release function on Python3 and call to flush from the generated python stubs - switch to using Capsules instead of CObjects - fix PyString to PyBytes - fix PyInt to PyLong - tweak the module registration to compile on both versions - drop PyInstance check for passed xmlNodes and instead check attributes presence Daniel
* Add support for xpathRegisterVariable in PythonShaun McCance2013-03-271-0/+26
|
* Fix a few problems with setEntityLoaderAlexey Neyman2013-02-251-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | 1. Setting entity loader does not increment the refcount on the Python object passed in. This works only if the object is not deleted. For example, the following code results in segmentation fault in Python interpreter when attempting to process any document: [[[ def register_entity_loader(): def entity_loader(URL, ID, ctxt): ... libxml2.setEntityLoader(entity_loader register_entity_loader() ]]] 2. setEntityLoader() does not verify if the passed object is callable. If it is not, current implementation attempts to call it anyway and failing that, silently moves on to default entity loader. Attached patch makes setEntityLoader raise ValueError exception if non-callable object is passed. 3. In debug mode, pythonExternalEntityLoader() outputs the result object to stderr, while the messages before and after the object (description + newline) go to stdout. Attached patch makes them all go to stdout.
* Python binding for xmlRegisterInputCallbackAlexey Neyman2013-02-251-0/+90
| | | | | | | | | | | | It is possible to make xmlIO handle any protocol by means of xmlRegisterInputCallback(). However, that function is currently only available in C API. So, the natural solution seems to be implementing Python bindings for the xmlRegisterInputCallback. * python/generator.py: skip xmlPopInputCallbacks * python/libxml.c python/libxml.py python/libxml_wrap.h: implement the wrappers * python/tests/input_callback.py python/tests/Makefile.am: also add a test case
* Bug 676544 - fails to build with --without-sax1Akira TAGOH2012-08-281-0/+2
| | | | | Added some ifdef'd LIBXML_SAX1_ENABLED to make it buildable with --without-sax1 configure option.
* clean redefinition of {v}snprintf in C-sourceRoumen Petrov2012-08-131-3/+1
| | | | as those from *config.h are preferable (e.g. win32config.h)
* Restore code for Windows compilationDaniel Veillard2012-05-231-1/+3
| | | | | Try to keep as close to rc1 but still allow the change from Roumen for mingw
* use mingw C99 compatible functions {v}snprintf instead those from MSVC runtimeRoumen Petrov2012-05-211-3/+1
|
* python: remove unused variableStefan Kost2011-05-251-1/+0
|
* python: flag two unused argsStefan Kost2011-05-251-2/+2
|
* Fix compilation with ClangKoop Mast2010-11-031-1/+1
| | | | Don't redefine vsnprintf if it is available
* Chasing dead assignments reported by clang-scanDaniel Veillard2009-09-071-0/+1
| | | | | | | | * SAX2.c dict.c error.c hash.c nanohttp.c parser.c python/libxml.c relaxng.c runtest.c tree.c valid.c xinclude.c xmlregexp.c xmlsave.c xmlschemas.c xpath.c xpointer.c: mostly removing unneded affectations, but this led to a few real bugs and some part not yet understood (relaxng/interleave)
* Borland C fix from Moritz Both regenerate, workaround a problem for bufferDaniel Veillard2008-09-011-114/+33
| | | | | | | | | | | | | | | | | | | * trionan.c: Borland C fix from Moritz Both * testapi.c: regenerate, workaround a problem for buffer testing * xmlIO.c HTMLtree.c: new internal entry point to hide even better xmlAllocOutputBufferInternal * tree.c: harden the code around buffer allocation schemes * parser.c: restore the warning when namespace names are not absolute URIs * runxmlconf.c: continue regression tests if we get the expected number of errors * Makefile.am: run the python tests on make check * xmlsave.c: handle the HTML documents and trees * python/libxml.c: convert python serialization to the xmlSave APIs and avoid some horrible hacks Daniel svn path=/trunk/; revision=3790
* fx compilation when configured without the reader should fix #513110Daniel Veillard2008-05-121-0/+5
| | | | | | | | | | * xmlschemas.c runtest.c testapi.c include/libxml/xmlreader.h python/types.c python/libxml_wrap.h python/libxml.c: fx compilation when configured without the reader should fix #513110 * doc/*: regenerated Daniel svn path=/trunk/; revision=3743
* fix a memory leak in the python string handling when SAX event are passedDaniel Veillard2007-01-091-0/+3
| | | | | | | | * python/libxml.c: fix a memory leak in the python string handling when SAX event are passed back to the python handlers Daniel svn path=/trunk/; revision=3573
* Added code submitted by Andreas Pakulat to provide node equality,William M. Brack2006-06-261-0/+36
| | | | | | | | * python/libxml.c, python/libxml.py, python/tests/compareNodes.py, python/tests/Makefile.am: Added code submitted by Andreas Pakulat to provide node equality, inequality and hash functions, plus a single test program to check the functions (bugs 345779 + 345961).
* more cleanups based on coverity reports. DanielDaniel Veillard2006-03-091-2/+2
| | | | | | * SAX2.c catalog.c encoding.c entities.c example/gjobread.c python/libxml.c: more cleanups based on coverity reports. Daniel
* applied fix from Jakub Piotr Clapa for xmlAttr.parent(), closing #312181Daniel Veillard2005-08-011-0/+1
| | | | | | * python/libxml.c: applied fix from Jakub Piotr Clapa for xmlAttr.parent(), closing #312181 Daniel
* don't output any message on failed resolver lookups, better done by theDaniel Veillard2005-07-291-1/+5
| | | | | | * python/libxml.c: don't output any message on failed resolver lookups, better done by the python user provided resolver layer. Daniel
* applied patch from Brent Hendricks adding namespace removal at the pythonDaniel Veillard2005-04-121-0/+50
| | | | | | | | * python/libxml.c python/libxml.py: applied patch from Brent Hendricks adding namespace removal at the python level #300209 * python/tests/Makefile.am python/tests/nsdel.py: added the regression test Daniel
* fixed bug #168504 DanielDaniel Veillard2005-03-311-1/+1
| | | | | * python/libxml.c: fixed bug #168504 Daniel
* applied patch from Brent Hendricks to avoid leak in python bindings whenDaniel Veillard2005-03-301-4/+3
| | | | | | | * python/generator.py python/libxml.c: applied patch from Brent Hendricks to avoid leak in python bindings when using schemas error handlers. Daniel
* try to fix a problem with valgrind. applied memory leak fix from BrentDaniel Veillard2005-03-021-0/+26
| | | | | | | | | * Makefile.am doc/examples/Makefile.am python/tests/Makefile.am xstc/Makefile.am: try to fix a problem with valgrind. * python/generator.py python/libxml.c python/tests/Makefile.am python/tests/tstmem.py: applied memory leak fix from Brent Hendricks c.f. bug #165349 Daniel
* Applied patch from Brent Hendricks adding support for late DTD validation.Daniel Veillard2004-11-101-1/+137
| | | | | | | | | * python/generator.py python/libxml.c python/libxml2class.txt python/libxml_wrap.h python/types.c: Applied patch from Brent Hendricks adding support for late DTD validation. * python/tests/Makefile.am python/tests/dtdvalid.py python/tests/test.dtd: integrated the provided regression test Daniel
* register xmlSchemaSetValidErrors, patch from Brent Hendricks in theDaniel Veillard2004-10-291-0/+1
| | | | | | | | | | | | | * python/libxml.c: register xmlSchemaSetValidErrors, patch from Brent Hendricks in the mailing-list * include/libxml/valid.h HTMLparser.c SAX2.c valid.c parserInternals.c: fix #156626 and more generally how to find out if a validation contect is part of a parsing context or not. This can probably be improved to make 100% sure that vctxt->userData is the parser context too. It's a bit hairy because we can't change the xmlValidCtxt structure without breaking the ABI since this change xmlParserCtxt information indexes. Daniel
* fixed a problem occuring only in x86_64 when very large error messages areDaniel Veillard2004-10-221-22/+13
| | | | | | * python/libxml.c: fixed a problem occuring only in x86_64 when very large error messages are raied to the Python handlers. Daniel
* applied patch from Malcolm Tredinnick fixing bug #154294 related to savingDaniel Veillard2004-10-041-0/+54
| | | | | | | * python/generator.py python/libxml.c python/tests/outbuf.py: applied patch from Malcolm Tredinnick fixing bug #154294 related to saving to python file objects. Daniel
* fix a problem on last commit DanielDaniel Veillard2004-08-221-0/+2
| | | | | * python/libxml.c: fix a problem on last commit Daniel
* trying to remove some warning when compiling on Fedora Core 3 and 64bitsDaniel Veillard2004-08-221-2/+2
| | | | | | | | * xmllint.c xpath.c include/libxml/xpath.h include/libxml/xpathInternals.h python/libxml.c python/libxml_wrap.h: trying to remove some warning when compiling on Fedora Core 3 and 64bits Daniel
* Applied patch from Torkel Lyng to add Schemas support to the PythonDaniel Veillard2004-08-181-0/+165
| | | | | | | | | | * xmlschemas.c include/libxml/xmlschemas.h python/generator.py python/libxml.c python/libxml_wrap.h python/types.c python/tests/schema.py python/tests/Makefile.am: Applied patch from Torkel Lyng to add Schemas support to the Python bindings and extend the schemas error API, registered a new test. * doc/* elfgcchack.h: rebuilt to regenerate the bindings Daniel
* added a check on the argument for some classes (e.g. xmlDoc and xmlNode)William M. Brack2004-07-161-2/+14
| | | | | | | | | | | * python/generator.py: added a check on the argument for some classes (e.g. xmlDoc and xmlNode) to prevent a segfault (as reported on the list). Further enhancement should be done to auto-create the appropriate object. * python/libxml.c: minor fix for a warning message; added a routine, currently not used, to report the description of a PyCObject. * python/libxml2class.txt: regenerated
* Changed the number of XPath extension functions allowed to beWilliam M. Brack2004-07-031-41/+67
| | | | | | | * python/libxml.c: Changed the number of XPath extension functions allowed to be variable-length (patch supplied by Marc-Antoine Parent, bug 143805). Added code to "unregister" the functions when the parser cleanup takes place.
* some updates with memory debugging facilities while messing with libxsltDaniel Veillard2004-07-021-0/+12
| | | | | | | * xmlmemory.c python/libxml.c python/libxml2-python-api.xml: some updates with memory debugging facilities while messing with libxslt python bindings Daniel
* applied patch from Stéphane Bidoul to fix some Python bindingsDaniel Veillard2004-07-011-10/+43
| | | | | | | | | | * python/libxml.c python/generator.py python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt: applied patch from Stéphane Bidoul to fix some Python bindings initialization, then had to change the parserCleanup() to handle memory released there. * xmlmemory.c: added more debugging comments. Daniel
* Fixed bug #141529 i.e. various problems when building with --without-htmlDaniel Veillard2004-04-301-0/+18
| | | | | | * xmllint.c xmlsave.c python/generator.py python/libxml.c: Fixed bug #141529 i.e. various problems when building with --without-html Daniel
* applied patch from Anthony Carrico providing Python bindings for theDaniel Veillard2004-03-091-2/+304
| | | | | | * python/libxml.c python/libxml.py: applied patch from Anthony Carrico providing Python bindings for the Canonicalization C14N support. Daniel
* added a small hack to fix interference between my fixes for bugs 132585William M. Brack2004-02-081-1/+4
| | | | | | | * xinclude.c: added a small hack to fix interference between my fixes for bugs 132585 and 132588. * python/libxml.c: fixed problem with serialization of namespace reported on the mailing list by Anthony Carrico
* applied patch from Frederic Peters fixing the wrong arg order in xpathDaniel Veillard2004-01-251-1/+1
| | | | | | * python/libxml.c: applied patch from Frederic Peters fixing the wrong arg order in xpath callback in bug #130980 Daniel
* cleanup the output buffer support to at least get the basic to work fixesDaniel Veillard2003-12-041-4/+90
| | | | | | | | | | * python/generator.py python/libxml.c python/libxml_wrap.h: cleanup the output buffer support to at least get the basic to work * python/tests/outbuf.py python/tests/serialize.py: fixes and cleanup. * include/libxml/xmlwriter.h: cleanup Daniel
* previous fix for #124044 was broken, correct fix provided. fixDaniel Veillard2003-10-311-3/+3
| | | | | | | | * python/libxml.c: previous fix for #124044 was broken, correct fix provided. * HTMLparser.c parser.c parserInternals.c xmlIO.c: fix xmlStopParser() and the error handlers to address #125877 Daniel
* be more defensive in the xmlReader python bindings fixing bug #124044Daniel Veillard2003-10-301-0/+8
| | | | | | * python/libxml.c: be more defensive in the xmlReader python bindings fixing bug #124044 Daniel
* enhanced macros to avoid breaking ABI from previous versions. modified toWilliam M. Brack2003-10-181-0/+1
| | | | | | | | | | | | * genChRanges.py, chvalid.c, include/libxml/chvalid.h, include/libxml/parserInternals.h: enhanced macros to avoid breaking ABI from previous versions. * catalog.c, parser.c, tree.c: modified to use IS_* macros defined in parserInternals.h. Makes maintenance much easier. * testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid compilation warnings * configuration.in: fixed pushHTML test error; enhanced for better devel (me) testing
* Okay this is scary but it is just adding a configure option to disableDaniel Veillard2003-09-291-1/+12
| | | | | | | | | | | | | | | | | | * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h include/libxml/catalog.h include/libxml/debugXML.h include/libxml/entities.h include/libxml/nanohttp.h include/libxml/relaxng.h include/libxml/tree.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlschemas.h include/libxml/xmlversion.h.in include/libxml/xpathInternals.h python/libxml.c: Okay this is scary but it is just adding a configure option to disable output, this touches most of the files. Daniel
* adding repeated parsing and validating tests make the new DOM treeDaniel Veillard2003-09-241-1/+3
| | | | | | | | | | | | | | | | | * Makefile.am: adding repeated parsing and validating tests * SAX2.c parser.c tree.c include/libxml/parser.h: make the new DOM tree building interfaces use the dictionary from the parsing context to build the element and attributes names as well as formatting spaces and short text nodes * include/libxml/dict.h dict.c: added some reference counting for xmlDictPtr because they can be shared by documents and a parser context. * xmlreader.c: a bit of cleanup, remove the specific tree freeing functions and use the standard ones now. * xmllint.c: add --nodict * python/libxml.c: fix a stupid bug so that ns() works on attribute nodes. Daniel
* use stderr and not stdout for default errors in python environment bugDaniel Veillard2003-09-171-2/+2
| | | | | | * python/libxml.c: use stderr and not stdout for default errors in python environment bug #122552 Daniel
* small changes to syntax to get rid of compiler warnings. No changes toWilliam M. Brack2003-08-051-3/+3
| | | | | | | | * error.c HTMLparser.c testC14N.c testHTML.c testURI.c xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c python/libxml.c include/libxml/xmlmemory.h: small changes to syntax to get rid of compiler warnings. No changes to logic.
* patch from Joachim Bauch + cleanup for Relax NG error callbacks in pythonDaniel Veillard2003-07-291-12/+194
| | | | | | | * python/generator.py python/libxml.c python/libxml2class.txt: patch from Joachim Bauch + cleanup for Relax NG error callbacks in python Daniel