* C-API: Added xpath_first_localonly() as an xpath function that skips prefix and namespace checks.
* Added experimental code for optizing XPath search using binary search. * Enable with XPATH_LIST_OPTIMIZE * Changed `clicon_rpc_generate_error(msg, xerr)` to `clicon_rpc_generate_error(xerr, msg, arg)`
This commit is contained in:
parent
ab46ce9820
commit
7ad16bd84b
56 changed files with 602 additions and 227 deletions
|
|
@ -692,6 +692,26 @@ clixon_trim(char *str)
|
|||
return s;
|
||||
}
|
||||
|
||||
/*! check string equals (NULL is equal)
|
||||
* @param[in] s1 String 1
|
||||
* @param[in] s2 String 2
|
||||
* @retval 0 Equal
|
||||
* @retval -1 Not equal
|
||||
* @retval 1 Not equal
|
||||
*/
|
||||
int
|
||||
clicon_strcmp(char *s1,
|
||||
char *s2)
|
||||
{
|
||||
if (s1 == NULL && s2 == NULL)
|
||||
return 0;
|
||||
if (s1 == NULL) /* empty string first */
|
||||
return -1;
|
||||
if (s2 == NULL)
|
||||
return 1;
|
||||
return strcmp(s1, s2);
|
||||
}
|
||||
|
||||
/*! strndup() for systems without it, such as xBSD
|
||||
*/
|
||||
#ifndef HAVE_STRNDUP
|
||||
|
|
@ -717,7 +737,6 @@ clicon_strndup(const char *str,
|
|||
#endif /* ! HAVE_STRNDUP */
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Turn this on for uni-test programs
|
||||
* Usage: clixon_string join
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue