summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLloyd Hilaiel <lloyd@hilaiel.com>2011-04-21 10:56:51 -0600
committerLloyd Hilaiel <lloyd@hilaiel.com>2011-04-21 13:58:28 -0600
commit9813127163116b7f928c383f14bb8618675a9694 (patch)
tree66fbf6ebf56d9bbe75095f5b97bab7fc22b2115e
parent0858bb341280956947df1cfae33eb5ac6ecfe6f7 (diff)
downloadyajl-9813127163116b7f928c383f14bb8618675a9694.tar.gz
rename yajl_parse_complete to yajl_complete_parse. the latter is correctly an imperative, while the former might be confused for a question.
-rw-r--r--reformatter/json_reformat.c2
-rw-r--r--src/api/yajl_parse.h6
-rw-r--r--src/yajl2
-rw-r--r--src/yajl.c2
-rw-r--r--test/yajl_test.c2
-rw-r--r--verify/json_verify.c6
6 files changed, 10 insertions, 10 deletions
diff --git a/reformatter/json_reformat.c b/reformatter/json_reformat.c
index ddcab01..d55ddaa 100644
--- a/reformatter/json_reformat.c
+++ b/reformatter/json_reformat.c
@@ -182,7 +182,7 @@ main(int argc, char ** argv)
}
}
- stat = yajl_parse_complete(hand);
+ stat = yajl_complete_parse(hand);
if (stat != yajl_status_ok) {
unsigned char * str = yajl_get_error(hand, 1, fileData, rd);
diff --git a/src/api/yajl_parse.h b/src/api/yajl_parse.h
index 0b868db..0a241d3 100644
--- a/src/api/yajl_parse.h
+++ b/src/api/yajl_parse.h
@@ -127,7 +127,7 @@ extern "C" {
*/
yajl_dont_validate_strings = 0x02,
/**
- * By default, upon calls to yajl_parse_complete(), yajl will
+ * By default, upon calls to yajl_complete_parse(), yajl will
* ensure the entire input text was consumed and will raise an error
* otherwise. Enabling this flag will cause yajl to disable this
* check. This can be useful when parsing json out of a that contains more
@@ -145,7 +145,7 @@ extern "C" {
*/
yajl_allow_multiple_values = 0x08,
/**
- * When yajl_parse_complete() is called the parser will
+ * When yajl_complete_parse() is called the parser will
* check that the top level value was completely consumed. I.E.,
* if called whilst in the middle of parsing a value
* yajl will enter an error state (premature EOF). Setting this
@@ -181,7 +181,7 @@ extern "C" {
*
* \param hand - a handle to the json parser allocated with yajl_alloc
*/
- YAJL_API yajl_status yajl_parse_complete(yajl_handle hand);
+ YAJL_API yajl_status yajl_complete_parse(yajl_handle hand);
/** get an error string describing the state of the
* parse.
diff --git a/src/yajl b/src/yajl
index 3b44518..fea800f 100644
--- a/src/yajl
+++ b/src/yajl
@@ -167,7 +167,7 @@ main(int argc, char ** argv)
if (done)
/* parse any remaining buffered data */
- stat = yajl_parse_complete(hand);
+ stat = yajl_complete_parse(hand);
else
/* read file data, pass to parser */
stat = yajl_parse(hand, fileData, rd);
diff --git a/src/yajl.c b/src/yajl.c
index 06950e5..793eea3 100644
--- a/src/yajl.c
+++ b/src/yajl.c
@@ -133,7 +133,7 @@ yajl_parse(yajl_handle hand, const unsigned char * jsonText,
yajl_status
-yajl_parse_complete(yajl_handle hand)
+yajl_complete_parse(yajl_handle hand)
{
return yajl_do_finish(hand);
}
diff --git a/test/yajl_test.c b/test/yajl_test.c
index 7d507f8..d669ca4 100644
--- a/test/yajl_test.c
+++ b/test/yajl_test.c
@@ -253,7 +253,7 @@ main(int argc, char ** argv)
if (stat != yajl_status_ok) break;
}
- stat = yajl_parse_complete(hand);
+ stat = yajl_complete_parse(hand);
if (stat != yajl_status_ok)
{
unsigned char * str = yajl_get_error(hand, 0, fileData, rd);
diff --git a/verify/json_verify.c b/verify/json_verify.c
index ea09cdf..8668e9f 100644
--- a/verify/json_verify.c
+++ b/verify/json_verify.c
@@ -43,7 +43,7 @@ main(int argc, char ** argv)
int retval = 0;
int allowComments = 0;
int checkUTF8 = 1;
-
+
/* check arguments.*/
int a = 1;
while ((a < argc) && (argv[a][0] == '-') && (strlen(argv[a]) > 1)) {
@@ -98,8 +98,8 @@ main(int argc, char ** argv)
}
/* parse any remaining buffered data */
- stat = yajl_parse_complete(hand);
-
+ stat = yajl_complete_parse(hand);
+
if (stat != yajl_status_ok)
{
if (!quiet) {