mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-07-29 11:41:22 +03:00
Completely changed the way the XPath evaluation is done, likely to break
stuff like libxslt right now: - Makefile.am: detect XPath memleaks in regreson tests - error.c: fixed and error w.r.t. error reporting still using stderr - hash.c: added new line at end of file - tree.h: minor cleanup - xpath.[ch] xpointer.[ch]: Major changes ! Separated XPath expression parsing from evaluation, resulted in a number of changes internally, and in XPointer. Likely to break stuff using xpathInternals.h but should remain binary compatible, new interfaces will be added. Daniel
This commit is contained in:
18
error.c
18
error.c
@ -214,7 +214,8 @@ xmlParserError(void *ctx, const char *msg, ...)
|
||||
str = xmlGetVarStr(msg, args);
|
||||
va_end(args);
|
||||
xmlGenericError(xmlGenericErrorContext, str);
|
||||
xmlFree(str);
|
||||
if (str != NULL)
|
||||
xmlFree(str);
|
||||
|
||||
if (ctxt != NULL) {
|
||||
xmlParserPrintFileContext(input);
|
||||
@ -259,7 +260,8 @@ xmlParserWarning(void *ctx, const char *msg, ...)
|
||||
str = xmlGetVarStr(msg, args);
|
||||
va_end(args);
|
||||
xmlGenericError(xmlGenericErrorContext, str);
|
||||
xmlFree(str);
|
||||
if (str != NULL)
|
||||
xmlFree(str);
|
||||
|
||||
if (ctxt != NULL) {
|
||||
xmlParserPrintFileContext(input);
|
||||
@ -291,6 +293,7 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlParserInputPtr input = NULL;
|
||||
char * str;
|
||||
va_list args;
|
||||
|
||||
if (ctxt != NULL) {
|
||||
@ -303,8 +306,11 @@ xmlParserValidityError(void *ctx, const char *msg, ...)
|
||||
|
||||
xmlGenericError(xmlGenericErrorContext, "validity error: ");
|
||||
va_start(args, msg);
|
||||
vfprintf(xmlGenericErrorContext, msg, args);
|
||||
str = xmlGetVarStr(msg, args);
|
||||
va_end(args);
|
||||
xmlGenericError(xmlGenericErrorContext, str);
|
||||
if (str != NULL)
|
||||
xmlFree(str);
|
||||
|
||||
if (ctxt != NULL) {
|
||||
xmlParserPrintFileContext(input);
|
||||
@ -325,6 +331,7 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
||||
{
|
||||
xmlParserCtxtPtr ctxt = (xmlParserCtxtPtr) ctx;
|
||||
xmlParserInputPtr input = NULL;
|
||||
char * str;
|
||||
va_list args;
|
||||
|
||||
if (ctxt != NULL) {
|
||||
@ -337,8 +344,11 @@ xmlParserValidityWarning(void *ctx, const char *msg, ...)
|
||||
|
||||
xmlGenericError(xmlGenericErrorContext, "validity warning: ");
|
||||
va_start(args, msg);
|
||||
vfprintf(xmlGenericErrorContext, msg, args);
|
||||
str = xmlGetVarStr(msg, args);
|
||||
va_end(args);
|
||||
xmlGenericError(xmlGenericErrorContext, str);
|
||||
if (str != NULL)
|
||||
xmlFree(str);
|
||||
|
||||
if (ctxt != NULL) {
|
||||
xmlParserPrintFileContext(input);
|
||||
|
Reference in New Issue
Block a user