diff options
Diffstat (limited to 'relaxng.c')
-rw-r--r-- | relaxng.c | 13 |
1 files changed, 7 insertions, 6 deletions
@@ -20,6 +20,7 @@ #include <string.h> #include <stdio.h> +#include <stddef.h> #include <libxml/xmlmemory.h> #include <libxml/parser.h> #include <libxml/parserInternals.h> @@ -4404,7 +4405,7 @@ xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def, if ((*tmp)->type == XML_RELAXNG_TEXT) { res = xmlHashAddEntry2(partitions->triage, BAD_CAST "#text", NULL, - (void *) (long) (i + 1)); + (void *) (ptrdiff_t) (i + 1)); if (res != 0) is_determinist = -1; } else if (((*tmp)->type == XML_RELAXNG_ELEMENT) && @@ -4412,22 +4413,22 @@ xmlRelaxNGComputeInterleaves(xmlRelaxNGDefinePtr def, if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0)) res = xmlHashAddEntry2(partitions->triage, (*tmp)->name, NULL, - (void *) (long) (i + 1)); + (void *) (ptrdiff_t) (i + 1)); else res = xmlHashAddEntry2(partitions->triage, (*tmp)->name, (*tmp)->ns, - (void *) (long) (i + 1)); + (void *) (ptrdiff_t) (i + 1)); if (res != 0) is_determinist = -1; } else if ((*tmp)->type == XML_RELAXNG_ELEMENT) { if (((*tmp)->ns == NULL) || ((*tmp)->ns[0] == 0)) res = xmlHashAddEntry2(partitions->triage, BAD_CAST "#any", NULL, - (void *) (long) (i + 1)); + (void *) (ptrdiff_t) (i + 1)); else res = xmlHashAddEntry2(partitions->triage, BAD_CAST "#any", (*tmp)->ns, - (void *) (long) (i + 1)); + (void *) (ptrdiff_t) (i + 1)); if ((*tmp)->nameClass != NULL) is_determinist = 2; if (res != 0) @@ -9387,7 +9388,7 @@ xmlRelaxNGValidateInterleave(xmlRelaxNGValidCtxtPtr ctxt, if (tmp == NULL) { i = nbgroups; } else { - i = ((long) tmp) - 1; + i = ((ptrdiff_t) tmp) - 1; if (partitions->flags & IS_NEEDCHECK) { group = partitions->groups[i]; if (!xmlRelaxNGNodeMatchesList(cur, group->defs)) |