summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2017-11-09 17:29:22 +0100
committerNick Wellnhofer <wellnhofer@aevum.de>2017-11-09 17:29:22 +0100
commite5f33e56bafc332fd63f6643b687ebfe14bcba56 (patch)
tree22d7e2e4e64c1b811cdb24c7b9b0dce5d4dee736
parent4dd6d7a58e3694af7ed42589affcfa9a1550dada (diff)
downloadlibxml2-e5f33e56bafc332fd63f6643b687ebfe14bcba56.tar.gz
Fix misc callback signatures
Fix parameter and return types for xmlC14NIsVisibleCallback and xmlRegExecCallbacks.
-rw-r--r--c14n.c7
-rw-r--r--xmlschemas.c13
2 files changed, 10 insertions, 10 deletions
diff --git a/c14n.c b/c14n.c
index b7cb7b0e..a0f2c19e 100644
--- a/c14n.c
+++ b/c14n.c
@@ -89,7 +89,7 @@ static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
xmlNsPtr ns,
xmlC14NCtxPtr ctx);
-static int xmlC14NIsNodeInNodeset (xmlNodeSetPtr nodes,
+static int xmlC14NIsNodeInNodeset (void *user_data,
xmlNodePtr node,
xmlNodePtr parent);
@@ -252,7 +252,8 @@ xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error,
#define XML_NAMESPACES_DEFAULT 16
static int
-xmlC14NIsNodeInNodeset(xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent) {
+xmlC14NIsNodeInNodeset(void *user_data, xmlNodePtr node, xmlNodePtr parent) {
+ xmlNodeSetPtr nodes = (xmlNodeSetPtr) user_data;
if((nodes != NULL) && (node != NULL)) {
if(node->type != XML_NAMESPACE_DECL) {
return(xmlXPathNodeSetContains(nodes, node));
@@ -1975,7 +1976,7 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes,
int mode, xmlChar ** inclusive_ns_prefixes,
int with_comments, xmlOutputBufferPtr buf) {
return(xmlC14NExecute(doc,
- (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset,
+ xmlC14NIsNodeInNodeset,
nodes,
mode,
inclusive_ns_prefixes,
diff --git a/xmlschemas.c b/xmlschemas.c
index f1274604..97a4db74 100644
--- a/xmlschemas.c
+++ b/xmlschemas.c
@@ -25986,11 +25986,12 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
}
static void
-xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED,
+xmlSchemaVContentModelCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
const xmlChar * name ATTRIBUTE_UNUSED,
- xmlSchemaElementPtr item,
- xmlSchemaNodeInfoPtr inode)
+ void *transdata, void *inputdata)
{
+ xmlSchemaElementPtr item = (xmlSchemaElementPtr) transdata;
+ xmlSchemaNodeInfoPtr inode = (xmlSchemaNodeInfoPtr) inputdata;
inode->decl = item;
#ifdef DEBUG_CONTENT
{
@@ -26095,8 +26096,7 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
*/
inode->regexCtxt =
xmlRegNewExecCtxt(inode->typeDef->contModel,
- (xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
- vctxt);
+ xmlSchemaVContentModelCallback, vctxt);
if (inode->regexCtxt == NULL) {
VERROR_INT("xmlSchemaValidatorPopElem",
"failed to create a regex context");
@@ -26644,8 +26644,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
* Create the regex context.
*/
regexCtxt = xmlRegNewExecCtxt(ptype->contModel,
- (xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
- vctxt);
+ xmlSchemaVContentModelCallback, vctxt);
if (regexCtxt == NULL) {
VERROR_INT("xmlSchemaValidateChildElem",
"failed to create a regex context");