Permalink
Browse files

rename yajl_parse_complete to yajl_complete_parse. the latter is corr…

…ectly an imperative, while the former might be confused for a question.
  • Loading branch information...
lloyd committed Apr 21, 2011
1 parent 0858bb3 commit 9813127163116b7f928c383f14bb8618675a9694
Showing with 10 additions and 10 deletions.
  1. +1 −1 reformatter/json_reformat.c
  2. +3 −3 src/api/yajl_parse.h
  3. +1 −1 src/yajl
  4. +1 −1 src/yajl.c
  5. +1 −1 test/yajl_test.c
  6. +3 −3 verify/json_verify.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);
@@ -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.
@@ -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);
@@ -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);
}
@@ -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);
@@ -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) {

0 comments on commit 9813127

Please sign in to comment.