mirror of
https://gitlab.gnome.org/GNOME/libxml2.git
synced 2025-10-23 01:52:48 +03:00
Fix misc callback signatures
Fix parameter and return types for xmlC14NIsVisibleCallback and xmlRegExecCallbacks.
This commit is contained in:
7
c14n.c
7
c14n.c
@@ -89,7 +89,7 @@ static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur,
|
|||||||
xmlNsPtr ns,
|
xmlNsPtr ns,
|
||||||
xmlC14NCtxPtr ctx);
|
xmlC14NCtxPtr ctx);
|
||||||
|
|
||||||
static int xmlC14NIsNodeInNodeset (xmlNodeSetPtr nodes,
|
static int xmlC14NIsNodeInNodeset (void *user_data,
|
||||||
xmlNodePtr node,
|
xmlNodePtr node,
|
||||||
xmlNodePtr parent);
|
xmlNodePtr parent);
|
||||||
|
|
||||||
@@ -252,7 +252,8 @@ xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error,
|
|||||||
#define XML_NAMESPACES_DEFAULT 16
|
#define XML_NAMESPACES_DEFAULT 16
|
||||||
|
|
||||||
static int
|
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((nodes != NULL) && (node != NULL)) {
|
||||||
if(node->type != XML_NAMESPACE_DECL) {
|
if(node->type != XML_NAMESPACE_DECL) {
|
||||||
return(xmlXPathNodeSetContains(nodes, node));
|
return(xmlXPathNodeSetContains(nodes, node));
|
||||||
@@ -1975,7 +1976,7 @@ xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes,
|
|||||||
int mode, xmlChar ** inclusive_ns_prefixes,
|
int mode, xmlChar ** inclusive_ns_prefixes,
|
||||||
int with_comments, xmlOutputBufferPtr buf) {
|
int with_comments, xmlOutputBufferPtr buf) {
|
||||||
return(xmlC14NExecute(doc,
|
return(xmlC14NExecute(doc,
|
||||||
(xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset,
|
xmlC14NIsNodeInNodeset,
|
||||||
nodes,
|
nodes,
|
||||||
mode,
|
mode,
|
||||||
inclusive_ns_prefixes,
|
inclusive_ns_prefixes,
|
||||||
|
|||||||
13
xmlschemas.c
13
xmlschemas.c
@@ -25986,11 +25986,12 @@ xmlSchemaCheckCOSValidDefault(xmlSchemaValidCtxtPtr vctxt,
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
xmlSchemaVContentModelCallback(xmlSchemaValidCtxtPtr vctxt ATTRIBUTE_UNUSED,
|
xmlSchemaVContentModelCallback(xmlRegExecCtxtPtr exec ATTRIBUTE_UNUSED,
|
||||||
const xmlChar * name ATTRIBUTE_UNUSED,
|
const xmlChar * name ATTRIBUTE_UNUSED,
|
||||||
xmlSchemaElementPtr item,
|
void *transdata, void *inputdata)
|
||||||
xmlSchemaNodeInfoPtr inode)
|
|
||||||
{
|
{
|
||||||
|
xmlSchemaElementPtr item = (xmlSchemaElementPtr) transdata;
|
||||||
|
xmlSchemaNodeInfoPtr inode = (xmlSchemaNodeInfoPtr) inputdata;
|
||||||
inode->decl = item;
|
inode->decl = item;
|
||||||
#ifdef DEBUG_CONTENT
|
#ifdef DEBUG_CONTENT
|
||||||
{
|
{
|
||||||
@@ -26095,8 +26096,7 @@ xmlSchemaValidatorPopElem(xmlSchemaValidCtxtPtr vctxt)
|
|||||||
*/
|
*/
|
||||||
inode->regexCtxt =
|
inode->regexCtxt =
|
||||||
xmlRegNewExecCtxt(inode->typeDef->contModel,
|
xmlRegNewExecCtxt(inode->typeDef->contModel,
|
||||||
(xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
|
xmlSchemaVContentModelCallback, vctxt);
|
||||||
vctxt);
|
|
||||||
if (inode->regexCtxt == NULL) {
|
if (inode->regexCtxt == NULL) {
|
||||||
VERROR_INT("xmlSchemaValidatorPopElem",
|
VERROR_INT("xmlSchemaValidatorPopElem",
|
||||||
"failed to create a regex context");
|
"failed to create a regex context");
|
||||||
@@ -26644,8 +26644,7 @@ xmlSchemaValidateChildElem(xmlSchemaValidCtxtPtr vctxt)
|
|||||||
* Create the regex context.
|
* Create the regex context.
|
||||||
*/
|
*/
|
||||||
regexCtxt = xmlRegNewExecCtxt(ptype->contModel,
|
regexCtxt = xmlRegNewExecCtxt(ptype->contModel,
|
||||||
(xmlRegExecCallbacks) xmlSchemaVContentModelCallback,
|
xmlSchemaVContentModelCallback, vctxt);
|
||||||
vctxt);
|
|
||||||
if (regexCtxt == NULL) {
|
if (regexCtxt == NULL) {
|
||||||
VERROR_INT("xmlSchemaValidateChildElem",
|
VERROR_INT("xmlSchemaValidateChildElem",
|
||||||
"failed to create a regex context");
|
"failed to create a regex context");
|
||||||
|
|||||||
Reference in New Issue
Block a user