1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-03-31 06:50:06 +03:00

io: Add some deprecation warnings

This commit is contained in:
Nick Wellnhofer 2024-07-15 15:10:18 +02:00
parent 2dcd561dc8
commit e0494c0d43
2 changed files with 15 additions and 0 deletions

View File

@ -211,6 +211,7 @@ XMLPUBFUN xmlParserInputBufferPtr
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFilename (const char *URI,
xmlCharEncoding enc);
XML_DEPRECATED
XMLPUBFUN xmlParserInputBufferPtr
xmlParserInputBufferCreateFile (FILE *file,
xmlCharEncoding enc);

14
xmlIO.c
View File

@ -1181,6 +1181,8 @@ xmlOutputDefaultOpen(xmlOutputBufferPtr buf, const char *filename,
* xmlAllocParserInputBuffer:
* @enc: the charset encoding if known (deprecated)
*
* DEPRECATED: Use xmlNewInputFrom*.
*
* Create a buffered parser input for progressive parsing.
*
* The encoding argument is deprecated and should be set to
@ -1484,6 +1486,8 @@ __xmlParserInputBufferCreateFilename(const char *URI, xmlCharEncoding enc) {
* @URI: a C string containing the URI or filename
* @enc: the charset encoding if known
*
* DEPRECATED: Use xmlNewInputFromUrl.
*
* Create a buffered parser input for the progressive parsing of a file
* Automatic support for ZLIB/Compress compressed document is provided
* by default if found at compile-time.
@ -1604,6 +1608,8 @@ xmlOutputBufferCreateFilename(const char *URI,
* @file: a FILE*
* @enc: the charset encoding if known (deprecated)
*
* DEPRECATED: Don't use.
*
* Create a buffered parser input for the progressive parsing of a FILE *
* buffered C I/O
*
@ -1718,6 +1724,8 @@ xmlOutputBufferGetSize(xmlOutputBufferPtr out) {
* @fd: a file descriptor number
* @enc: the charset encoding if known (deprecated)
*
* DEPRECATED: Use xmlNewInputFromFd.
*
* Create a buffered parser input for the progressive parsing for the input
* from a file descriptor
*
@ -1832,6 +1840,8 @@ xmlNewInputBufferMemory(const void *mem, size_t size, int flags,
* @size: the length of the memory block
* @enc: the charset encoding if known (deprecated)
*
* DEPRECATED: Use xmlNewInputFromMemory.
*
* Create a parser input buffer for parsing from a memory area.
*
* This function makes a copy of the whole input buffer. If you are sure
@ -1859,6 +1869,8 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
* @size: the length of the memory block
* @enc: the charset encoding if known
*
* DEPRECATED: Use xmlNewInputFromMemory.
*
* Create a parser input buffer for parsing from a memory area.
*
* This functions assumes that the contents of the input buffer remain
@ -1977,6 +1989,8 @@ xmlOutputBufferCreateFd(int fd, xmlCharEncodingHandlerPtr encoder) {
* @ioctx: an I/O handler
* @enc: the charset encoding if known (deprecated)
*
* DEPRECATED: Use xmlNewInputFromIO.
*
* Create a buffered parser input for the progressive parsing for the input
* from an I/O handler
*