summaryrefslogtreecommitdiff
path: root/testapi.c
Commit message (Collapse)AuthorAgeFilesLines
* Regenerate docs and testapi.cNick Wellnhofer2023-04-261-8/+10
|
* testapi.c: Initialize catalog earlyNick Wellnhofer2022-12-081-1/+4
| | | | Avoid leak reports when testing --with-mem-debug.
* gentest.py: Fix memory leak in API testsNick Wellnhofer2022-12-081-127/+141
| | | | Regressed in commit ff34ba3e.
* testapi: Disable on Windows for nowNick Wellnhofer2022-09-041-0/+8
| | | | It's incredibly slow for some reason.
* Don't create missing.xml when running testapiNick Wellnhofer2022-08-261-1/+1
| | | | | Side effect of b31e07db. Use a non-existing directory to avoid creating a file.
* Consolidate private header filesNick Wellnhofer2022-08-261-39/+1
| | | | | | | | | | | Private functions were previously declared - in header files in the root directory - in public headers guarded with IN_LIBXML - in libxml.h - redundantly in source files that used them. Consolidate all private header files in include/private.
* Move some HTML functions to correct header fileNick Wellnhofer2022-08-241-70/+70
|
* Introduce xmlNewSAXParserCtxt and htmlNewSAXParserCtxtNick Wellnhofer2022-08-241-5/+84
| | | | | Add API functions to create a parser context with a custom SAX handler without having to mess with ctxt->sax manually.
* Fix testapi when building --without-sax1Nick Wellnhofer2022-08-221-1/+5
| | | | Broken in commit c61e1273.
* Disable network in API testsNick Wellnhofer2022-05-201-0/+1
| | | | Avoids hangs when trying to make network connections.
* testapi: remove leading slash from "/missing.xml"Mike Gilbert2022-04-221-1/+1
| | | | | | Fixes an error when running tests in a sandbox on Gentoo Linux. Bug: https://bugs.gentoo.org/839804
* Fix warnings when testing --with-minimum buildNick Wellnhofer2022-04-211-341/+158
| | | | | | There's no simple way to make the doc/examples tests handle different configurations. But these tests aren't especially valuable, so remove the result file checks.
* Add configuration flag for XPointer locations supportNick Wellnhofer2022-04-211-200/+13
| | | | | | | | | | | | | | | | | | | | | 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.
* Regenerate api.xml and testapi.cNick Wellnhofer2022-04-211-652/+4
|
* Disable legacy support by defaultNick Wellnhofer2022-02-201-211/+2
| | | | | | If you need support for legacy APIs, you have to enable it explicitly: ./configure --with-legacy
* Add XML_DEPRECATED macroNick Wellnhofer2022-02-201-0/+3
| | | | | __attribute__((deprecated)) is available since at least GCC 3.1, so an exact version check is probably unnecessary.
* Fix unused function warning in testapi.cNick Wellnhofer2022-02-041-0/+2
|
* Release of libxml2-2.9.11v2.9.11Daniel Veillard2021-05-131-14/+42
| | | | | | | Prompted by CVE-2021-3541, but this includes an awful lot of serious bug fixes by Nick and others. - configure.ac: bumped to new release - doc/* updated and regenerated
* Fix typosNick Wellnhofer2020-03-081-4/+4
| | | | Resolves #133.
* Large batch of typo fixesJared Yanovich2019-09-301-8/+8
| | | | Closes #109.
* Fix unused function warning in testapi.cNick Wellnhofer2019-01-061-110/+73
| | | | | | Check whether all param and return types are known before generating functions for param types. Otherwise, unused functions end up in testapi.c.
* Release of libxml2-2.9.8v2.9.8Daniel Veillard2018-03-051-1/+39
| | | | * configure.ac doc/* libxml2.syms testapi.c: updated for the new release
* Fix callback signature in testapi.cNick Wellnhofer2017-11-141-1/+2
|
* Release of libxml2-2.9.5v2.9.5Daniel Veillard2017-09-041-8/+8
| | | | | * configure.ac, doc/xslt.html: updated for the release * doc/*, python/setup.py, testapi.c: regenerated
* Avoid out-of-bound array access in API testsNick Wellnhofer2017-06-011-0/+174
| | | | | | | | | | | The API tests combine string buffers with arbitrary length values which makes ASan detect out-of-bound array accesses. Even without ASan, this could lead to unwanted test failures. Add a check for "len", "size", and "start" arguments, assuming they apply to the nearest char pointer. Skip the test if they exceed the buffer size. This is a somewhat naive heuristic but it seems to work well.
* Fix apibuild for a recently added constructv2.9.4-rc2Daniel Veillard2016-05-091-52/+49
| | | | | | commit c71f9305a99b6aa03cb08fab31106c9c56f1be4f added __XML_EXTERNC cpp construct which not understood by apibuild, leading to make dist failures, ask to ignore that construct.
* Fix typos: dictio{ nn -> n }ar{y,ies}Jan Pokorný2016-04-151-7/+7
| | | | Signed-off-by: Jan Pokorný <jpokorny@redhat.com>
* Bug 758572: ASAN crash in make check ↵David Kilzer2016-04-081-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | <https://bugzilla.gnome.org/show_bug.cgi?id=758572> Instead of sending a random string length into API methods, compute the string length properly to fix out-of-bounds accesses caught with AddressSanitizer turned on. * testapi.c: (test_htmlCreateMemoryParserCtxt): (test_htmlCreatePushParserCtxt): (test_htmlCtxtReadMemory): (test_htmlParseChunk): (test_htmlReadMemory): (test_xmlDictExists): (test_xmlDictLookup): (test_xmlCreatePushParserCtxt): (test_xmlCtxtReadMemory): (test_xmlCtxtResetPush): (test_xmlParseChunk): (test_xmlParseInNodeContext): (test_xmlParseMemory): (test_xmlReadMemory): (test_xmlRecoverMemory): (test_xmlSAXParseMemory): (test_xmlSAXParseMemoryWithData): (test_xmlSAXUserParseMemory): (test_xmlCreateMemoryParserCtxt): (test_xmlRelaxNGNewMemParserCtxt): (test_xmlBufferAdd): (test_xmlBufferAddHead): (test_xmlBuildQName): (test_xmlDocDumpFormatMemory): (test_xmlDocDumpFormatMemoryEnc): (test_xmlDocDumpMemory): (test_xmlNewCDataBlock): (test_xmlNewDocTextLen): (test_xmlNewTextLen): (test_xmlNodeAddContentLen): (test_xmlNodeSetContentLen): (test_xmlSplitQName3): (test_xmlStringLenGetNodeList): (test_xmlTextConcat): (test_xmlOutputBufferWrite): (test_xmlParserInputBufferCreateMem): (test_xmlParserInputBufferCreateStatic): (test_xmlParserInputBufferPush): (test_xmlReaderForMemory): (test_xmlReaderNewMemory): (test_xmlSchemaNewMemParserCtxt): (test_xmlCharStrndup): (test_xmlStrncatNew): (test_xmlStrncmp): (test_xmlStrndup): (test_xmlStrsub): (test_xmlTextWriterWriteBase64): (test_xmlTextWriterWriteBinHex): (test_xmlTextWriterWriteRawLen):
* Release of libxml2-2.9.3v2.9.3Daniel Veillard2015-11-201-4/+4
| | | | | * configure.ac: updated * doc/*: regenerated
* Python generator bug raised by the const changev2.9.2-rc2Daniel Veillard2014-10-131-191/+212
| | | | the doc methode for xmlDocGetRootElement wasn't generated anymore
* Regenerated API, and testapi, rebuild documentationDaniel Veillard2013-04-011-1/+92
| | | | After the previous commit adding 2 new entry points
* Fix spelling of "length".Michael Wood2012-10-301-4/+4
|
* Release of libxml2-2.9.0v2.9.0Daniel Veillard2012-09-111-8/+56
| | | | | | * libxml.spec.in: update * doc/*: updated and regenerated * libxml2.syms testapi.c: regenerated
* Big space and tab cleanupDaniel Veillard2012-09-111-8/+8
| | | | Remove all space before tabs and space and tabs at end of lines.
* Expose xmlBufShrink in the public tree APIDaniel Veillard2012-08-221-1/+12
| | | | | | | | | | | | | | | | | | | | | | | As suggested by Andrew W. Nosenko: Proposal: expose the new xmlBufShrink() to the "public" API for compatibility with xmlBufUse(). Reason: the following scenario: 1. Read something into xmlParserInputBuffer (e.g. using xmlParserInputBufferRead()) 2. Extract content through xmlBufContent() 3. Extract content length through xmlBufUse(). Result have type 'size_t'. 4. Use this content 5. Now, you need to shrink the buffer. How to do it? Doing that through legacy xmlBufferShrink() is unsafe because it uses 'unsigned int' and the whole point of introducing the new API was handling the cases, when 'unsigned int' is not enough. Therefore, need to use the new xmlBufShrink(). But it is "private". Therefore, I propose to expose the new xmlBufShrink() in the same way, as xmlBufContent() and xmlBufUse() are exposed.
* Patch for portability of latin characters in C filesDaniel Veillard2012-08-201-2/+2
| | | | | Coming from LibreOffice repository: http://cgit.freedesktop.org/libreoffice/core/plain/libxml2/libxml2-latin.patch
* Regenerated testapi.cDaniel Veillard2012-08-151-4/+265
|
* clean redefinition of {v}snprintf in C-sourceRoumen Petrov2012-08-131-3/+0
| | | | as those from *config.h are preferable (e.g. win32config.h)
* minimize use of HAVE_CONFIG_HRoumen Petrov2012-08-131-3/+0
| | | | as build process for supported platforms provide "config.h" header file
* Various "make distcheck" and portability fixupsDaniel Richard G2012-08-061-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Makefile.am: * Don't use @VAR@, use $(VAR). Autoconf's AC_SUBST provides us the Make variable, it allows overriding the value at the command line, and (notably) it avoids a Make parse error in the libxml2_la_LDFLAGS assignment when @MODULE_PLATFORM_LIBS@ is empty * Changed how the THREADS_W32 mechanism switches the build between testThreads.c and testThreadsWin32.c as appropriate; using AM_CONDITIONAL allows this to work cleanly and plays well with dependencies * testapi.c should be specified as BUILT_SOURCES * Create symlinks to the test/ and result/ subdirs so that the runtests target is usable in out-of-source-tree builds * Don't do MAKEFLAGS+=--silent as this is not portable to non-GNU Makes * Fixed incorrect find(1) syntax in the "cleanup" rule, and doing "rm -f" instead of just "rm" is good form * (DIST)CLEANFILES needed a bit more coverage to allow "make distcheck" to pass configure.in: * Need AC_PROG_LN_S to create test/ and result/ symlinks in Makefile.am * AC_LIBTOOL_WIN32_DLL and AM_PROG_LIBTOOL are obsolete; these have been superceded by LT_INIT * Don't rebuild docs by default, as this requires GNU Make (as implemented) * Check for uint32_t as some platforms don't provide it * Check for some more functions, and undefine HAVE_MMAP if we don't also HAVE_MUNMAP (one system I tested on actually needed this) * Changed THREADS_W32 from a filename insert into an Automake conditional * The "Copyright" file will not be in the current directory if builddir != srcdir doc/Makefile.am: * EXTRA_DIST cannot use wildcards when they refer to generated files; this breaks dependencies. What I did was define EXTRA_DIST_wc, which uses GNU Make $(wildcard) directives to build up a list of files, and EXTRA_DIST, as a literal expansion of EXTRA_DIST_wc. I also added a new rule, "check-extra-dist", to simplify checking that the two variables are equivalent. (Note that this works only when builddir == srcdir) (I can implement this differently if desired; this is just one way of doing it) * Don't define an "all" target; this steps on Automake's toes * Fixed up the "libxml2-api.xml ..." rule by using $(wildcard) for dependencies (as Make doesn't process the wildcards otherwise) and qualifying appropriate files with $(srcdir) (Note that $(srcdir) is not needed in the dependencies, thanks to VPATH, which we can count on as this is GNU-Make-only code anyway) doc/devhelp/Makefile.am: * Qualified appropriate files with $(srcdir) * Added an "uninstall-local" rule so that "make distcheck" passes doc/examples/Makefile.am: * Rather than use a wildcard that doesn't work, use a substitution that most Make programs can handle doc/examples/index.py: * Do the same here include/libxml/nanoftp.h: * Some platforms (e.g. MSVC 6) already #define INVALID_SOCKET: user@host:/cygdrive/c/Program Files/Microsoft Visual Studio/VC98/\ Include$ grep -R INVALID_SOCKET . ./WINSOCK.H:#define INVALID_SOCKET (SOCKET)(~0) ./WINSOCK2.H:#define INVALID_SOCKET (SOCKET)(~0) include/libxml/xmlversion.h.in: * Support ancient GCCs (I was actually able to build the library with 2.5 but for this bit) python/Makefile.am: * Expanded CLEANFILES to allow "make distcheck" to pass python/tests/Makefile.am: * Define CLEANFILES instead of a "clean" rule, and added tmp.xml to allow "make distcheck" to pass testRelax.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H (as some systems have the header but not the function) testSchemas.c: * Use HAVE_MMAP instead of the less explicit HAVE_SYS_MMAN_H testapi.c: * Don't use putenv() if it's not available threads.c: * This fixes the following build error on Solaris 8: libtool: compile: cc -DHAVE_CONFIG_H -I. -I./include -I./include \ -D_REENTRANT -D__EXTENSIONS__ -D_REENTRANT -Dsparc -Xa -mt -v \ -xarch=v9 -xcrossfile -xO5 -c threads.c -KPIC -DPIC -o threads.o "threads.c", line 442: controlling expressions must have scalar type "threads.c", line 512: controlling expressions must have scalar type cc: acomp failed for threads.c *** Error code 1 trio.c: * Define isascii() if the system doesn't provide it trio.h: * The trio library's HAVE_CONFIG_H header is not the same as LibXML2's HAVE_CONFIG_H header; this change is needed to avoid a double-inclusion win32/configure.js: * Added support for the LZMA compression option win32/Makefile.{bcb,mingw,msvc}: * Added appropriate bits to support WITH_LZMA=1 * Install the header files under $(INCPREFIX)\libxml2\libxml instead of $(INCPREFIX)\libxml, to mirror the install location on Unix+Autotools xml2-config.in: * @MODULE_PLATFORM_LIBS@ (usually "-ldl") needs to be in there in order for `xml2-config --libs` to provide a complete set of dependencies xmllint.c: * Use HAVE_MMAP instead of the less-explicit HAVE_SYS_MMAN_H
* Release of libxml2-2.8.0v2.8.0Daniel Veillard2012-05-231-1/+27
| | | | | | | - Makefile.am: don't package .git - configure.in : update to new release - doc/xml.html: added the new release - doc/* testapi.c: regenerated
* Restore code for Windows compilationDaniel Veillard2012-05-231-1/+1
| | | | | Try to keep as close to rc1 but still allow the change from Roumen for mingw
* Fix various bugs in new code raised by the API checkingDaniel Veillard2012-05-151-7/+87
| | | | | | * testapi.c: regenerated and covering new APIs * tree.c: xmlBufferDetach can't work on immutable buffers * xzlib.c: fix a deallocation error
* testapi: use the right type for the checkStefan Kost2011-05-251-2/+4
| | | | Fixes a compiler warning. Also wrap the long line if statement.
* 614087 Fix Socket API usage to allow Windows64 compilationOzkan Sezer2010-11-041-58/+3
| | | | | | | In Windows 64 a socket is no more represented by an int, this breaks the nanoftp API and nanoftp/nanohttp, the patch changes this and fix the API for Win64 Regenerated the XML and documentation as a result too.
* Regenerated API and symbolsDaniel Veillard2009-08-241-1/+50
| | | | | | * doc/Makefile.am: make the check for symbols pbm a make api failure * doc/symbols.xml: added xmlXIncludeProcessTreeFlagsData * doc//* elfgcchack.h libxml2.syms testapi.c: regenerated
* Rebuilt the API and regenerated docsDaniel Veillard2009-08-211-12/+8
|
* 545579 doesn't compile without schema supportDaniel Veillard2009-08-101-6/+7
| | | | * testapi.c: fix to get gen_nb_void_ptr_ptr() generated unconditionally
* Fixed apibuild.py, regenerated doc and interfacesDaniel Veillard2009-07-241-21/+21
| | | | | | * doc/apibuild.py: fixed the parsing after the change of macro name * doc/* testapi.c: regenerated
* updated SVN URL for GNOME as pointed by Vincent Lefevre and regeneratedDaniel Veillard2009-03-251-1/+1
| | | | | | | | * doc/*: updated SVN URL for GNOME as pointed by Vincent Lefevre and regenerated docs daniel svn path=/trunk/; revision=3824