1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-08-03 08:21:55 +03:00

io: Deprecate xmlOutputBuffer members

This commit is contained in:
Nick Wellnhofer
2025-07-23 02:20:13 +02:00
parent 6c0188549b
commit af464de1f3
2 changed files with 14 additions and 8 deletions

View File

@ -148,16 +148,20 @@ struct _xmlParserInputBuffer {
* Output buffer
*/
struct _xmlOutputBuffer {
void* context;
xmlOutputWriteCallback writecallback;
xmlOutputCloseCallback closecallback;
void* context XML_DEPRECATED_MEMBER;
xmlOutputWriteCallback writecallback XML_DEPRECATED_MEMBER;
xmlOutputCloseCallback closecallback XML_DEPRECATED_MEMBER;
xmlCharEncodingHandler *encoder; /* I18N conversions to UTF-8 */
/* I18N conversions to UTF-8 */
xmlCharEncodingHandler *encoder XML_DEPRECATED_MEMBER;
xmlBuf *buffer; /* Local buffer encoded in UTF-8 or ISOLatin */
xmlBuf *conv; /* if encoder != NULL buffer for output */
int written; /* total number of byte written */
int error;
/* Local buffer encoded in UTF-8 or ISOLatin */
xmlBuf *buffer XML_DEPRECATED_MEMBER;
/* if encoder != NULL buffer for output */
xmlBuf *conv XML_DEPRECATED_MEMBER;
/* total number of byte written */
int written XML_DEPRECATED_MEMBER;
int error XML_DEPRECATED_MEMBER;
};
#endif /* LIBXML_OUTPUT_ENABLED */

View File

@ -516,6 +516,7 @@ libxml_outputBufferGetPythonFile(ATTRIBUTE_UNUSED PyObject *self,
Py_INCREF(Py_None);
return(Py_None);
}
XML_IGNORE_DEPRECATION_WARNINGS
if (obj->closecallback != xmlPythonFileClose) {
fprintf(stderr,
"outputBufferGetPythonFile: not a python file wrapper\n");
@ -527,6 +528,7 @@ libxml_outputBufferGetPythonFile(ATTRIBUTE_UNUSED PyObject *self,
Py_INCREF(Py_None);
return(Py_None);
}
XML_POP_WARNINGS
Py_INCREF(file);
return(file);
}