python/types.c


Log

Author Commit Date CI Message
Nick Wellnhofer 0d901258 2022-09-04T16:41:43 Fix Windows compiler warnings in python/types.c
Nick Wellnhofer 71736b4e 2022-09-04T16:16:37 Fix libxml_PyFileGet Broken in commit 75cdb6dd.
Nick Wellnhofer 75cdb6dd 2022-09-02T16:47:25 Fix unused variable warning in python/types.c
Nick Wellnhofer ce8f3d11 2022-08-29T23:53:40 Fix libxml_PyFileGet with stdout on macOS macOS returns O_RDWR for standard file descriptors, but fails to write to stdout or stderr when opened with fdopen(dup_fd, "rw").
Nick Wellnhofer 67070107 2022-04-20T23:17:14 Add configuration flag for XPointer locations support Add a new configuration flag that controls whether the outdated support for XPointer locations (ranges and points) is enabled. --with-xptr-locs # Autotools LIBXML2_WITH_XPTR_LOCS # CMake The latest spec for what it essentially an XPath extension seems to be this working draft from 2002: https://www.w3.org/TR/xptr-xpointer/ The xpointer() scheme is listed as "being reviewed" in the XPointer registry since at least 2006. libxml2 seems to be the only modern software that tries to implement this spec, but the code has many bugs and quality issues. The flag defaults to "off" and support for this extensions has to be requested explicitly. The relevant API functions are deprecated.
Chun-wei Fan 6e169c14 2021-03-30T16:11:13 python: Port python 3.x module to Windows On Windows, we don't have fcntl() which helps us to find out how a file was opened, so we need to resort to the Windows API NtQueryInformationFile() in ntdll.dll to help us, and compare the file access modes as appropriate to deduce the modes we want to pass into fdopen(). As all official Python 3.x releases are built against newer Windows CRTs that toughen checks on the validity of the file descriptor when we convert the fd to a native Windows File Handle using _get_osfhandle(), we need to define an empty handler so that the program does not abort if the fd that was passed in was invalid; instead, we just return NULL if _get_osfhandle() could not return us a valid Windows File Handle.
Miro Hrončok e4fb3684 2020-02-28T12:48:14 Parenthesize Py<type>_Check() in ifs In C, if expressions should be parenthesized. PyLong_Check, PyUnicode_Check etc. happened to expand to a parenthesized expression before, but that's not API to rely on. Since Python 3.9.0a4 it needs to be parenthesized explicitly. Fixes https://gitlab.gnome.org/GNOME/libxml2/issues/149
Jared Yanovich 2a350ee9 2019-09-30T17:04:54 Large batch of typo fixes Closes #109.
Patrick Welche d910e99c 2017-11-06T16:20:25 python: remove single use of _PyVerify_fd _PyVerify_fd disappeared from python with: https://hg.python.org/cpython/rev/e88e2049b793 https://bugzilla.gnome.org/show_bug.cgi?id=776815
Armin K 6eea2f2c 2013-05-30T19:00:50 python: Fix compiler warnings when building python3 bindings
Daniel Veillard bf4a8f0e 2013-04-02T10:27:57 Fix python bindings with versions older than 2.7 Need fixing on the Capsule usage, the lack of PyBytes, lack of io module and the way to access exception details.
Daniel Veillard 3798c4ad 2013-03-29T13:46:24 Fix compilation on Python3 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
Shaun McCance 519bc6a3 2012-09-19T13:41:56 Add support for xpathRegisterVariable in Python
Daniel Veillard 438ebbd5 2008-05-12T12:58:46 fx compilation when configured without the reader should fix #513110 * 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
Daniel Veillard 5d279c95 2008-03-12T09:32:04 fix a memory errro when using namespace nodes returned from XPath queries, * python/types.c: fix a memory errro when using namespace nodes returned from XPath queries, should fix #521699 * python/tests/Makefile.am python/tests/xpathns.py: add a specific regression test for it Daniel svn path=/trunk/; revision=3703
Daniel Veillard db67015a 2007-06-12T10:04:37 try to allow compilation on old python version should fix #398125 Daniel * python/types.c: try to allow compilation on old python version should fix #398125 Daniel svn path=/trunk/; revision=3632
Daniel Veillard 46459066 2006-10-10T08:40:04 applied patch from Ross Reedstrom, Brian West and Stefan Anca to add * python/libxml.py python/types.c: applied patch from Ross Reedstrom, Brian West and Stefan Anca to add XPointer suport to the Python bindings Daniel
Daniel Veillard a4bd3692 2006-06-18T17:40:53 patch from Nic Ferrier to provide a better type mapping from XPath to * python/types.c: patch from Nic Ferrier to provide a better type mapping from XPath to python Daniel
Daniel Veillard 634ec27a 2006-02-22T15:11:32 Nic Ferrier found debug statement left in the XPath conversion code Daniel * python/types.c: Nic Ferrier found debug statement left in the XPath conversion code Daniel
Daniel Veillard 850ce9b6 2004-11-10T11:55:47 Applied patch from Brent Hendricks adding support for late DTD validation. * 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
Daniel Veillard 259f0dfa 2004-08-18T09:13:18 Applied patch from Torkel Lyng to add Schemas support to the Python * 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
Daniel Veillard 46da4649 2004-01-06T22:54:57 applied patch from Stephane Bidoul for structured error handling from * python/libxml2-python-api.xml python/libxml_wrap.h python/types.c python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Stephane Bidoul for structured error handling from python, and the associated test Daniel
Daniel Veillard 591b4be0 2003-02-09T23:33:36 fixed doc comment problems adding RelaxNG wrappers added a specific test * xpath.c: fixed doc comment problems * python/generator.py python/libxml_wrap.h python/types.c: adding RelaxNG wrappers * python/tests/Makefile.am python/tests/relaxng.py: added a specific test of those early Python RelaxNG bindings Daniel
Daniel Veillard 0e298ad2 2003-02-04T16:14:33 fixing #104096 to compile without regexps Daniel * configure.in valid.c xmlreader.c python/libxml_wrap.h python/types.c: fixing #104096 to compile without regexps Daniel
Daniel Veillard 417be3ae 2003-01-20T21:26:34 patch from Stphane Bidoul for better per context error message APIs * xmlreader.c python/drv_libxml2.py python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: patch from Stphane Bidoul for better per context error message APIs * python/tests/ctxterror.py python/tests/readererr.py: update of the tests Daniel
Daniel Veillard e6227e05 2003-01-14T11:42:39 applied and fixed a patch from Stephane Bibould to provide per parser * python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: applied and fixed a patch from Stephane Bibould to provide per parser error handlers at the Python level. * python/tests/Makefile.am python/tests/ctxterror.py: added a regression test for it. Daniel
Daniel Veillard 0eb38c72 2002-12-14T23:00:35 added the close and getattribute methods of XmlTextReader. added the * xmlreader.c doc/libxml2-api.xml: added the close and getattribute methods of XmlTextReader. * python/generator.py python/libxml_wrap.h python/types.c python/libxml2class.txt: added the reader to the Python bindings * python/tests/Makefile.am python/tests/reader.py: added a specific test for the Python bindings of the Reader APIs * parser.c: small cleanup. Daniel
Daniel Veillard c0ac0699 2002-10-20T21:31:50 fixed bugs when passing result value tree to Python functions. Daniel * python/types.c: fixed bugs when passing result value tree to Python functions. Daniel
Daniel Veillard bd9afb52 2002-09-25T22:25:35 improving some documentation comments found and fixed a mem leak with * tree.c: improving some documentation comments * xmlregexp.c: found and fixed a mem leak with python regression tests * doc/*: rebuilt the doc and the API XML file including the xmlregexp.h xmlautomata.h and xmlunicode.h headers * python/generator.py python/libxml2class.txt python/libxml_wrap.h python/types.c: added access to the XML Schemas regexps from python * python/tests/Makefile.am python/tests/regexp.py: added a simple regexp bindings test Daniel
Daniel Veillard c6d4a933 2002-09-12T15:00:57 updated the python bindings, added code for easier File I/O, and the * python/generator.py python/libxml.c python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: updated the python bindings, added code for easier File I/O, and the ability to define a resolver from Python fixing bug #91635 * python/tests/Makefile.am python/tests/inbuf.py python/tests/outbuf.py python/tests/pushSAXhtml.py python/tests/resolver.py python/tests/serialize.py: updated and augmented the set of Python tests. Daniel
Daniel Veillard d2379010 2002-03-15T22:24:56 Cleanup of the python Makefiles based on Jacob and James feedback, fixed * libxml.spec.in python/Makefile.am python/tests/Makefile.am python/generator.py python/libxml.c python/types.c: Cleanup of the python Makefiles based on Jacob and James feedback, fixed the spec file accordingly, fixed the number of warning that passing my pedantic CFLAGS was generating. Conclusion is that Python includes are real crap. Daniel
Daniel Veillard 79426f2b 2002-03-01T16:14:17 added the possibility of returning nodesets from XPath extension functions * python/types.c python/tests/Makefile.am python/tests/xpathret.py: added the possibility of returning nodesets from XPath extension functions written in Python Daniel
Daniel Veillard a94ec6ff 2002-03-01T13:00:53 commiting some Python bindings work done while travelling Daniel * python/*: commiting some Python bindings work done while travelling Daniel
Daniel Veillard 6361da0c 2002-02-23T10:10:33 Added wrapper for the xmlURIPtr type, provided accessors, fixed the * python/generator.py python/libxml.c python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: Added wrapper for the xmlURIPtr type, provided accessors, fixed the accessor generator for strings * python/tests/Makefile.am python/tests/tstURI.py: added a specific regression test. Daniel
Daniel Veillard c575b997 2002-02-08T13:28:40 Changed to the MIT Licence updated the doc accordingly preparing 2.4.14 * Copyright Makefile.am README configure.in libxml.spec.in: Changed to the MIT Licence * doc/FAQ.html doc/catalog.html doc/intro.html doc/xml.html doc/xmlio.html: updated the doc accordingly * include/libxml/xmlwin32version.h configure.in: preparing 2.4.14 release * python/generator.py python/libxml.c python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: fixed the const xmlChar * wrapper and generator, XPath extension functions now use the context as first argument * python/tests/tstxpath.py python/tests/xpath.py python/tests/xpathext.py: Updated the tests accordingly * tree.c: fixed bug #70067 Daniel
Daniel Veillard 7db3871b 2002-02-07T16:39:11 cleanup always use stdout if output is NULL don't close filedescriptors * Makefile.am: cleanup * debugXML.c: always use stdout if output is NULL * xmlIO.c: don't close filedescriptors passed to outputBuffers * python/Makefile.am python/generator.py python/libxml2class.txt python/libxml_wrap.h python/types.c: augmented the number of bindings handling FILE * and XPath contexts * python/tests/Makefile.am: avoid a stupid problem due to the use of TEST. Daniel
Daniel Veillard 4e1b26cf 2002-02-03T20:13:06 change a small bit in the way valididy error messages get initialized * parserInternals.c: change a small bit in the way valididy error messages get initialized * python/TODO python/libxml.c python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: added some memory debugging to track leaks at the libxml2 level * python/tests/*.py: changed all tests to check for leaks, there is just one left in XPath extension registrations. daniel
Daniel Veillard 3ce5257b 2002-02-03T15:08:05 cleanup added class for parser context, added first cut for push mode * python/Makefile.am python/types.c: cleanup * python/libxml.c python/libxml.py python/libxml_wrap.h python/generator.py python/libxml2-python-api.xml python/libxml2class.txt: added class for parser context, added first cut for push mode support. Added a framework to generate accessors functions. * python/tests/Makefile.am python/tests/push.py: added a push test Daniel