mirror of
https://github.com/zeux/pugixml.git
synced 2025-01-03 01:55:25 +08:00
Fix XPath return type for contains() and string-length()
git-svn-id: http://pugixml.googlecode.com/svn/trunk@944 99668b35-9821-0410-8761-19e4c4f06640
This commit is contained in:
parent
2e4f6c54a8
commit
33301e9f42
@ -8883,7 +8883,7 @@ PUGI__NS_BEGIN
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_count, xpath_type_number, args[0]);
|
||||
}
|
||||
else if (name == PUGIXML_TEXT("contains") && argc == 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_string, args[0], args[1]);
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_contains, xpath_type_boolean, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("concat") && argc >= 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_concat, xpath_type_string, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("ceiling") && argc == 1)
|
||||
@ -8945,7 +8945,7 @@ PUGI__NS_BEGIN
|
||||
if (name == PUGIXML_TEXT("string") && argc <= 1)
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_0 : ast_func_string_1, xpath_type_string, args[0]);
|
||||
else if (name == PUGIXML_TEXT("string-length") && argc <= 1)
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_string, args[0]);
|
||||
return new (alloc_node()) xpath_ast_node(argc == 0 ? ast_func_string_length_0 : ast_func_string_length_1, xpath_type_number, args[0]);
|
||||
else if (name == PUGIXML_TEXT("starts-with") && argc == 2)
|
||||
return new (alloc_node()) xpath_ast_node(ast_func_starts_with, xpath_type_boolean, args[0], args[1]);
|
||||
else if (name == PUGIXML_TEXT("substring-before") && argc == 2)
|
||||
|
Loading…
x
Reference in New Issue
Block a user