On 11 Nov 2015, at 11:00, Nick Wellnhofer <wellnho...@aevum.de> wrote:
>> case XML_ELEMENT_NODE: >> if (node2->type == XML_ELEMENT_NODE) { >> if ((0 > (long) node1->content) && /* TODO: Would a != 0 suffice here? */ >> (0 > (long) node2->content) && >> >> The intent is not entirely clear but if these are supposed to be NULL checks >> then they could easily give the wrong result. > > Just to clarify: The values stored in node->content are actually integers > used to speed up node comparisons. See xmlXPathOrderDocElems: In which case you probably want intptr_t and this macro: — Macro: AC_TYPE_INTPTR_T If stdint.h or inttypes.h defines the type intptr_t, define HAVE_INTPTR_T. Otherwise, define intptr_t to a signed integer type wide enough to hold a pointer, if such a type exists. -- Alex Bligh _______________________________________________ xml mailing list, project page http://xmlsoft.org/ xml@gnome.org https://mail.gnome.org/mailman/listinfo/xml