문제

I'm parsing xml via libxml2 library. After updating Xcode to 5.1, I got warning that last parameter - length - is implicitly converted to int, while it's unsigned long. Here's function declaration:

XMLPUBFUN xmlNodePtr XMLCALL
    xmlNewCDataBlock(xmlDocPtr doc,
                     const xmlChar *content,
                     int len);

Is there any similar function that takes unsigned long values, because I don't know how big my data can be, and I want to process it safely.

도움이 되었습니까?

해결책

There's no such function. libxml2's string manipulation functions use ints for string lengths and offsets, so text nodes longer than INT_MAX are not supported.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top