mirror of
https://gitlab.gnome.org/GNOME/libxml2
synced 2025-03-28 21:33:13 +00:00
io: Fix resetting xmlParserInputBufferCreateFilename hook
We don't want to invoke the default function.
This commit is contained in:
parent
47cbb6bb3c
commit
717f3a7b21
14
xmlIO.c
14
xmlIO.c
@ -2211,13 +2211,17 @@ xmlOutputBufferCreateIO(xmlOutputWriteCallback iowrite,
|
||||
* Returns the old value of the registration function
|
||||
*/
|
||||
xmlParserInputBufferCreateFilenameFunc
|
||||
xmlParserInputBufferCreateFilenameDefault(xmlParserInputBufferCreateFilenameFunc func)
|
||||
xmlParserInputBufferCreateFilenameDefault(
|
||||
xmlParserInputBufferCreateFilenameFunc func)
|
||||
{
|
||||
xmlParserInputBufferCreateFilenameFunc old = xmlParserInputBufferCreateFilenameValue;
|
||||
if (old == NULL) {
|
||||
old = __xmlParserInputBufferCreateFilename;
|
||||
}
|
||||
xmlParserInputBufferCreateFilenameFunc old;
|
||||
|
||||
old = xmlParserInputBufferCreateFilenameValue;
|
||||
if (old == NULL)
|
||||
old = __xmlParserInputBufferCreateFilename;
|
||||
|
||||
if (func == __xmlParserInputBufferCreateFilename)
|
||||
func = NULL;
|
||||
xmlParserInputBufferCreateFilenameValue = func;
|
||||
return(old);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user