mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-03-19 14:50:07 +03:00
Refactor name and type signature for xmlNop
Update xmlNop's name to xmlInputReadCallbackNop and its type signature to match xmlInputReadCallback. Fixes bug 786134.
This commit is contained in:
parent
7218255092
commit
28f52fe89d
2
libxml.h
2
libxml.h
@ -96,7 +96,7 @@ int __xmlRandom(void);
|
||||
#endif
|
||||
|
||||
XMLPUBFUN xmlChar * XMLCALL xmlEscapeFormatString(xmlChar **msg);
|
||||
int xmlNop(void);
|
||||
int xmlInputReadCallbackNop(void *context, char *buffer, int len);
|
||||
|
||||
#ifdef IN_LIBXML
|
||||
#ifdef __GNUC__
|
||||
|
3
parser.c
3
parser.c
@ -2086,7 +2086,8 @@ static void xmlGROW (xmlParserCtxtPtr ctxt) {
|
||||
|
||||
if (((curEnd > (unsigned long) XML_MAX_LOOKUP_LIMIT) ||
|
||||
(curBase > (unsigned long) XML_MAX_LOOKUP_LIMIT)) &&
|
||||
((ctxt->input->buf) && (ctxt->input->buf->readcallback != (xmlInputReadCallback) xmlNop)) &&
|
||||
((ctxt->input->buf) &&
|
||||
(ctxt->input->buf->readcallback != xmlInputReadCallbackNop)) &&
|
||||
((ctxt->options & XML_PARSE_HUGE) == 0)) {
|
||||
xmlFatalErr(ctxt, XML_ERR_INTERNAL_ERROR, "Huge input lookup");
|
||||
xmlHaltParser(ctxt);
|
||||
|
10
xmlIO.c
10
xmlIO.c
@ -703,14 +703,16 @@ xmlCheckFilename (const char *path)
|
||||
}
|
||||
|
||||
/**
|
||||
* xmlNop:
|
||||
* xmlInputReadCallbackNop:
|
||||
*
|
||||
* No Operation function, does nothing, no input
|
||||
* No Operation xmlInputReadCallback function, does nothing.
|
||||
*
|
||||
* Returns zero
|
||||
*/
|
||||
int
|
||||
xmlNop(void) {
|
||||
xmlInputReadCallbackNop(void *context ATTRIBUTE_UNUSED,
|
||||
char *buffer ATTRIBUTE_UNUSED,
|
||||
int len ATTRIBUTE_UNUSED) {
|
||||
return(0);
|
||||
}
|
||||
|
||||
@ -2932,7 +2934,7 @@ xmlParserInputBufferCreateMem(const char *mem, int size, xmlCharEncoding enc) {
|
||||
ret = xmlAllocParserInputBuffer(enc);
|
||||
if (ret != NULL) {
|
||||
ret->context = (void *) mem;
|
||||
ret->readcallback = (xmlInputReadCallback) xmlNop;
|
||||
ret->readcallback = xmlInputReadCallbackNop;
|
||||
ret->closecallback = NULL;
|
||||
errcode = xmlBufAdd(ret->buffer, (const xmlChar *) mem, size);
|
||||
if (errcode != 0) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user