Skip to content

Commit e4db033

Browse files
author
Zach Drayer
committed
Add prototype headers, casting to shut up warnings
1 parent dc78a63 commit e4db033

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

XPathQuery.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@
1414
#import <libxml/xpath.h>
1515
#import <libxml/xpathInternals.h>
1616

17+
NSDictionary *DictionaryForNode(xmlNodePtr currentNode, NSMutableDictionary *parentResult);
18+
NSArray *PerformXPathQuery(xmlDocPtr doc, NSString *query);
19+
1720
NSDictionary *DictionaryForNode(xmlNodePtr currentNode, NSMutableDictionary *parentResult)
1821
{
1922
NSMutableDictionary *resultForNode = [NSMutableDictionary dictionary];
@@ -150,7 +153,7 @@
150153
xmlDocPtr doc;
151154

152155
/* Load XML document */
153-
doc = htmlReadMemory([document bytes], [document length], "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
156+
doc = htmlReadMemory([document bytes], (int)[document length], "", NULL, HTML_PARSE_NOWARNING | HTML_PARSE_NOERROR);
154157

155158
if (doc == NULL)
156159
{
@@ -169,7 +172,7 @@
169172
xmlDocPtr doc;
170173

171174
/* Load XML document */
172-
doc = xmlReadMemory([document bytes], [document length], "", NULL, XML_PARSE_RECOVER);
175+
doc = xmlReadMemory([document bytes], (int)[document length], "", NULL, XML_PARSE_RECOVER);
173176

174177
if (doc == NULL)
175178
{

0 commit comments

Comments
 (0)