Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix typos #665

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ Released 2012-09-23
- Add `json_load_callback()` that calls a callback function
repeatedly to read the JSON input (#57).

- Add JSON_ESCAPE_SLASH encoding flag to escape all occurences of
- Add JSON_ESCAPE_SLASH encoding flag to escape all occurrences of
``/`` with ``\/``.

* Bug fixes:
Expand Down Expand Up @@ -642,7 +642,7 @@ Released 2011-10-06

* Documentation:

- Clarify the lifecycle of the result of the ``s`` fromat of
- Clarify the lifecycle of the result of the ``s`` format of
`json_unpack()`. (#31)

- Add some portability info. (#36)
Expand Down Expand Up @@ -688,7 +688,7 @@ Released 2011-06-10
value. By default, only arrays and objects can be encoded. (#19)

- Add ``JSON_REJECT_DUPLICATES`` decoding flag to issue a decoding
error if any JSON object in the input contins duplicate keys. (#3)
error if any JSON object in the input contains duplicate keys. (#3)

- Add ``JSON_DISABLE_EOF_CHECK`` decoding flag to stop decoding after a
valid JSON input. This allows other data after the JSON data.
Expand Down Expand Up @@ -751,7 +751,7 @@ details.

* Backwards incompatible changes:

- Unify unsigned integer usage in the API: All occurences of
- Unify unsigned integer usage in the API: All occurrences of
unsigned int and unsigned long have been replaced with size_t.

- Change JSON integer's underlying type to the widest signed integer
Expand Down Expand Up @@ -820,7 +820,7 @@ Released 2010-06-13

* Bug fixes:

- Fix an error that occured when an array or object was first
- Fix an error that occurred when an array or object was first
encoded as empty, then populated with some data, and then
re-encoded

Expand Down
2 changes: 1 addition & 1 deletion doc/apiref.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1010,7 +1010,7 @@ in which case no error information is returned to the caller.

``json_error_unknown``

Unknown error. This should only be returned for non-errorneous
Unknown error. This should only be returned for non-erroneous
:type:`json_error_t` structures.

``json_error_out_of_memory``
Expand Down
2 changes: 1 addition & 1 deletion src/hashtable.h
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ void *hashtable_iter_at(hashtable_t *hashtable, const char *key, size_t key_len)
* @iter: The iterator
*
* Returns a new iterator pointing to the next element in the
* hashtable or NULL if the whole hastable has been iterated over.
* hashtable or NULL if the whole hashtable has been iterated over.
*/
void *hashtable_iter_next(hashtable_t *hashtable, void *iter);

Expand Down
4 changes: 2 additions & 2 deletions src/jansson_private.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int jsonp_loop_check(hashtable_t *parents, const json_t *json, char *key, size_t

/* Windows compatibility */
#if defined(_WIN32) || defined(WIN32)
#if defined(_MSC_VER) /* MS compiller */
#if defined(_MSC_VER) /* MS compiler */
#if (_MSC_VER < 1900) && \
!defined(snprintf) /* snprintf not defined yet & not introduced */
#define snprintf _snprintf
Expand All @@ -105,7 +105,7 @@ int jsonp_loop_check(hashtable_t *parents, const json_t *json, char *key, size_t
!defined(vsnprintf) /* vsnprintf not defined yet & not introduced */
#define vsnprintf(b, c, f, a) _vsnprintf(b, c, f, a)
#endif
#else /* Other Windows compiller, old definition */
#else /* Other Windows compiler, old definition */
#define snprintf _snprintf
#define vsnprintf _vsnprintf
#endif
Expand Down
6 changes: 3 additions & 3 deletions test/suites/api/test_fixed_size.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,19 +175,19 @@ static void test_binary_keys(void) {
fail("cannot get integer key2");

if (json_object_size(obj) != 2)
fail("binary object size missmatch");
fail("binary object size mismatch");

if (json_object_deln(obj, (const char *)&key1, sizeof(key1)))
fail("cannot del integer key1");

if (json_object_size(obj) != 1)
fail("binary object size missmatch");
fail("binary object size mismatch");

if (json_object_deln(obj, (const char *)&key2, sizeof(key2)))
fail("cannot del integer key2");

if (json_object_size(obj) != 0)
fail("binary object size missmatch");
fail("binary object size mismatch");

json_decref(obj);
}
Expand Down
2 changes: 1 addition & 1 deletion test/suites/api/test_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void file_not_found() {

pos = strchr(error.text, ':');
if (!pos)
fail("json_load_file returne an invalid error message");
fail("json_load_file returned an invalid error message");

*pos = '\0';

Expand Down
4 changes: 2 additions & 2 deletions test/suites/api/test_number.c
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
#pragma warning(push)
#pragma warning(disable : 4756)
#endif
static void test_inifity() {
static void test_infinity() {
json_t *real = json_real(INFINITY);
if (real != NULL)
fail("could construct a real from Inf");
Expand Down Expand Up @@ -117,7 +117,7 @@ static void run_tests() {
#endif

#ifdef INFINITY
test_inifity();
test_infinity();
#endif
test_bad_args();
}
4 changes: 2 additions & 2 deletions test/suites/api/test_pack.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#pragma warning(push)
#pragma warning(disable : 4756)
#endif
static void test_inifity() {
static void test_infinity() {
json_error_t error;

if (json_pack_ex(&error, 0, "f", INFINITY))
Expand Down Expand Up @@ -372,7 +372,7 @@ static void run_tests() {
#endif

#ifdef INFINITY
test_inifity();
test_infinity();
#endif

/* Whitespace; regular string */
Expand Down