Browse Source

Clean trailing white-space.

tags/json-c-0.14-20200419
Björn Esser 5 years ago
parent
commit
78cd37fb18
No known key found for this signature in database GPG Key ID: F52E98007594C21D
11 changed files with 30 additions and 30 deletions
  1. +4
    -4
      .travis.yml
  2. +1
    -1
      CMakeLists.txt
  3. +1
    -1
      Doxyfile
  4. +3
    -3
      README.md
  5. +1
    -1
      STYLE.txt
  6. +1
    -1
      json_object.c
  7. +14
    -14
      json_object.h
  8. +2
    -2
      json_visit.h
  9. +1
    -1
      printbuf.h
  10. +1
    -1
      tests/test-defs.sh
  11. +1
    -1
      tests/test_float.c

+ 4
- 4
.travis.yml View File

@@ -20,7 +20,7 @@ matrix:
dist: bionic dist: bionic
compiler: gcc compiler: gcc
env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6" env: MATRIX_EVAL="CC=gcc-6 && CXX=g++-6"
# gcc 7 is the default on bionic # gcc 7 is the default on bionic
- os: linux - os: linux
dist: bionic dist: bionic
@@ -31,7 +31,7 @@ matrix:
compiler: gcc compiler: gcc
env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8" env: MATRIX_EVAL="CC=gcc-8 && CXX=g++-8"


# clang
# clang
# xenial # xenial
- os: linux - os: linux
dist: xenial dist: xenial
@@ -54,7 +54,7 @@ matrix:
packages: packages:
- clang-6.0 - clang-6.0
- cmake - cmake
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"
env: MATRIX_EVAL="CC=clang-6.0 && CXX=clang++-6.0"


# clang-7 is the default on xenial and bionic # clang-7 is the default on xenial and bionic
- os: linux - os: linux
@@ -132,7 +132,7 @@ before_install:


before_script: before_script:
# XXX osx on travis doesn't work w/ set -e, so turn it off :( # XXX osx on travis doesn't work w/ set -e, so turn it off :(
- set +e
- set +e
- mkdir -p build || echo "Failed to mkdir build" - mkdir -p build || echo "Failed to mkdir build"
- cd build || echo "Failed to cd build" - cd build || echo "Failed to cd build"
- cmake .. || echo "Failed to run cmake" - cmake .. || echo "Failed to run cmake"


+ 1
- 1
CMakeLists.txt View File

@@ -356,7 +356,7 @@ if (DOXYGEN_FOUND)
add_custom_target(doc add_custom_target(doc
COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Doxyfile COMMAND ${DOXYGEN_EXECUTABLE} ${PROJECT_SOURCE_DIR}/Doxyfile
WORKING_DIRECTORY ${PROJECT_BINARY_DIR}) WORKING_DIRECTORY ${PROJECT_BINARY_DIR})
# request to configure the file # request to configure the file
configure_file(Doxyfile Doxyfile) configure_file(Doxyfile Doxyfile)




+ 1
- 1
Doxyfile View File

@@ -753,7 +753,7 @@ WARN_LOGFILE =
# spaces. # spaces.
# Note: If this tag is empty the current directory is searched. # Note: If this tag is empty the current directory is searched.


INPUT =
INPUT =


# This tag can be used to specify the character encoding of the source files # This tag can be used to specify the character encoding of the source files
# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses # that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses


+ 3
- 3
README.md View File

@@ -143,9 +143,9 @@ cmake-configure can take a few options.


| options | Description| | options | Description|
| ---- | ---- | | ---- | ---- |
| prefix=PREFIX | install architecture-independent files in PREFIX |
| prefix=PREFIX | install architecture-independent files in PREFIX |
| enable-threading | Enable code to support partly multi-threaded use | | enable-threading | Enable code to support partly multi-threaded use |
| enable-rdrand | Enable RDRAND Hardware RNG Hash Seed generation on supported x86/x64 platforms. |
| enable-rdrand | Enable RDRAND Hardware RNG Hash Seed generation on supported x86/x64 platforms. |
| enable-shared | build shared libraries [default=yes] | | enable-shared | build shared libraries [default=yes] |
| enable-static | build static libraries [default=yes] | | enable-static | build static libraries [default=yes] |
| disable-Bsymbolic | Avoid linking with -Bsymbolic-function | | disable-Bsymbolic | Avoid linking with -Bsymbolic-function |
@@ -175,7 +175,7 @@ make test
make USE_VALGRIND=0 test # optionally skip using valgrind make USE_VALGRIND=0 test # optionally skip using valgrind
``` ```


If a test fails, check `Testing/Temporary/LastTest.log`,
If a test fails, check `Testing/Temporary/LastTest.log`,
`tests/testSubDir/${testname}/${testname}.vg.out`, and other similar files. `tests/testSubDir/${testname}/${testname}.vg.out`, and other similar files.
If there is insufficient output try: If there is insufficient output try:
```sh ```sh


+ 1
- 1
STYLE.txt View File

@@ -11,7 +11,7 @@ spaces for continuation lines have been abandoned in favor of the
convenience of using clang-format. convenience of using clang-format.
Refer to the .clang-format file for details, and run the tool before commit: Refer to the .clang-format file for details, and run the tool before commit:


clang-format -i somefile.c foo.h
clang-format -i somefile.c foo.h


For sections of code that would be significantly negatively impacted, surround For sections of code that would be significantly negatively impacted, surround
them with magic comments to disable formatting: them with magic comments to disable formatting:


+ 1
- 1
json_object.c View File

@@ -197,7 +197,7 @@ int json_object_put(struct json_object *jso)


#if defined(HAVE_ATOMIC_BUILTINS) && defined(ENABLE_THREADING) #if defined(HAVE_ATOMIC_BUILTINS) && defined(ENABLE_THREADING)
/* Note: this only allow the refcount to remain correct /* Note: this only allow the refcount to remain correct
* when multiple threads are adjusting it. It is still an error
* when multiple threads are adjusting it. It is still an error
* for a thread to decrement the refcount if it doesn't "own" it, * for a thread to decrement the refcount if it doesn't "own" it,
* as that can result in the thread that loses the race to 0 * as that can result in the thread that loses the race to 0
* operating on an already-freed object. * operating on an already-freed object.


+ 14
- 14
json_object.h View File

@@ -377,7 +377,7 @@ JSON_EXPORT int json_object_object_add(struct json_object *obj, const char *key,
* @param obj the json_object instance * @param obj the json_object instance
* @param key the object field name (a private copy will be duplicated) * @param key the object field name (a private copy will be duplicated)
* @param val a json_object or NULL member to associate with the given field * @param val a json_object or NULL member to associate with the given field
* @param opts process-modifying options. To specify multiple options, use
* @param opts process-modifying options. To specify multiple options, use
* arithmetic or (OPT1|OPT2) * arithmetic or (OPT1|OPT2)
*/ */
JSON_EXPORT int json_object_object_add_ex(struct json_object *obj, const char *const key, JSON_EXPORT int json_object_object_add_ex(struct json_object *obj, const char *const key,
@@ -585,7 +585,7 @@ JSON_EXPORT struct json_object *json_object_array_get_idx(const struct json_obje
/** Delete an elements from a specified index in an array (a json_object of type json_type_array) /** Delete an elements from a specified index in an array (a json_object of type json_type_array)
* *
* The reference count will be decremented for each of the deleted objects. If there * The reference count will be decremented for each of the deleted objects. If there
* are no more owners of an element that is being deleted, then the value is
* are no more owners of an element that is being deleted, then the value is
* freed. Otherwise, the reference to the value will remain in memory. * freed. Otherwise, the reference to the value will remain in memory.
* *
* @param obj the json_object instance * @param obj the json_object instance
@@ -617,8 +617,8 @@ JSON_EXPORT struct json_object *json_object_new_boolean(json_bool b);
JSON_EXPORT json_bool json_object_get_boolean(const struct json_object *obj); JSON_EXPORT json_bool json_object_get_boolean(const struct json_object *obj);


/** Set the json_bool value of a json_object /** Set the json_bool value of a json_object
*
* The type of obj is checked to be a json_type_boolean and 0 is returned
*
* The type of obj is checked to be a json_type_boolean and 0 is returned
* if it is not without any further actions. If type of obj is json_type_boolean * if it is not without any further actions. If type of obj is json_type_boolean
* the object value is changed to new_value * the object value is changed to new_value
* *
@@ -667,8 +667,8 @@ JSON_EXPORT struct json_object *json_object_new_uint64(uint64_t i);
JSON_EXPORT int32_t json_object_get_int(const struct json_object *obj); JSON_EXPORT int32_t json_object_get_int(const struct json_object *obj);


/** Set the int value of a json_object /** Set the int value of a json_object
*
* The type of obj is checked to be a json_type_int and 0 is returned
*
* The type of obj is checked to be a json_type_int and 0 is returned
* if it is not without any further actions. If type of obj is json_type_int * if it is not without any further actions. If type of obj is json_type_int
* the object value is changed to new_value * the object value is changed to new_value
* *
@@ -725,8 +725,8 @@ JSON_EXPORT int64_t json_object_get_int64(const struct json_object *obj);
JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj); JSON_EXPORT uint64_t json_object_get_uint64(const struct json_object *obj);


/** Set the int64_t value of a json_object /** Set the int64_t value of a json_object
*
* The type of obj is checked to be a json_type_int and 0 is returned
*
* The type of obj is checked to be a json_type_int and 0 is returned
* if it is not without any further actions. If type of obj is json_type_int * if it is not without any further actions. If type of obj is json_type_int
* the object value is changed to new_value * the object value is changed to new_value
* *
@@ -851,8 +851,8 @@ JSON_EXPORT int json_object_double_to_json_string(struct json_object *jso, struc
JSON_EXPORT double json_object_get_double(const struct json_object *obj); JSON_EXPORT double json_object_get_double(const struct json_object *obj);


/** Set the double value of a json_object /** Set the double value of a json_object
*
* The type of obj is checked to be a json_type_double and 0 is returned
*
* The type of obj is checked to be a json_type_double and 0 is returned
* if it is not without any further actions. If type of obj is json_type_double * if it is not without any further actions. If type of obj is json_type_double
* the object value is changed to new_value * the object value is changed to new_value
* *
@@ -924,8 +924,8 @@ JSON_EXPORT int json_object_get_string_len(const struct json_object *obj);
JSON_EXPORT int json_object_set_string(json_object *obj, const char *new_value); JSON_EXPORT int json_object_set_string(json_object *obj, const char *new_value);


/** Set the string value of a json_object str /** Set the string value of a json_object str
*
* The type of obj is checked to be a json_type_string and 0 is returned
*
* The type of obj is checked to be a json_type_string and 0 is returned
* if it is not without any further actions. If type of obj is json_type_string * if it is not without any further actions. If type of obj is json_type_string
* the object value is changed to new_value * the object value is changed to new_value
* *
@@ -969,7 +969,7 @@ JSON_EXPORT int json_object_equal(struct json_object *obj1, struct json_object *
* When shallow_copy is called *dst will be NULL, and must be non-NULL when it returns. * When shallow_copy is called *dst will be NULL, and must be non-NULL when it returns.
* src will never be NULL. * src will never be NULL.
* *
* If shallow_copy sets the serializer on an object, return 2 to indicate to
* If shallow_copy sets the serializer on an object, return 2 to indicate to
* json_object_deep_copy that it should not attempt to use the standard userdata * json_object_deep_copy that it should not attempt to use the standard userdata
* copy function. * copy function.
* *
@@ -980,7 +980,7 @@ typedef int(json_c_shallow_copy_fn)(json_object *src, json_object *parent, const


/** /**
* The default shallow copy implementation for use with json_object_deep_copy(). * The default shallow copy implementation for use with json_object_deep_copy().
* This simply calls the appropriate json_object_new_<type>() function and
* This simply calls the appropriate json_object_new_<type>() function and
* copies over the serializer function (_to_json_string internal field of * copies over the serializer function (_to_json_string internal field of
* the json_object structure) but not any _userdata or _user_delete values. * the json_object structure) but not any _userdata or _user_delete values.
* *


+ 2
- 2
json_visit.h View File

@@ -25,7 +25,7 @@ typedef int(json_c_visit_userfunc)(json_object *jso, int flags, json_object *par
* userfunc must return one of the defined return values, to indicate * userfunc must return one of the defined return values, to indicate
* whether and how to continue visiting nodes, or one of various ways to stop. * whether and how to continue visiting nodes, or one of various ways to stop.
* *
* Returns 0 if nodes were visited successfully, even if some were
* Returns 0 if nodes were visited successfully, even if some were
* intentionally skipped due to what userfunc returned. * intentionally skipped due to what userfunc returned.
* Returns <0 if an error occurred during iteration, including if * Returns <0 if an error occurred during iteration, including if
* userfunc returned JSON_C_VISIT_RETURN_ERROR. * userfunc returned JSON_C_VISIT_RETURN_ERROR.
@@ -58,7 +58,7 @@ JSON_EXPORT int json_c_visit(json_object *jso, int future_flags, json_c_visit_us
* This json_c_visit_userfunc return value indicates that iteration * This json_c_visit_userfunc return value indicates that iteration
* of the fields/elements of the <b>containing</b> object should stop * of the fields/elements of the <b>containing</b> object should stop
* and continue "popped up" a level of the object hierarchy. * and continue "popped up" a level of the object hierarchy.
* For example, returning this when handling arg will result in
* For example, returning this when handling arg will result in
* arg3 and any other fields being skipped. The next call to userfunc * arg3 and any other fields being skipped. The next call to userfunc
* will be the JSON_C_VISIT_SECOND call on "foo", followed by a userfunc * will be the JSON_C_VISIT_SECOND call on "foo", followed by a userfunc
* call on "bar". * call on "bar".


+ 1
- 1
printbuf.h View File

@@ -15,7 +15,7 @@


/** /**
* @file * @file
* @brief Internal string buffer handing. Unless you're writing a
* @brief Internal string buffer handing. Unless you're writing a
* json_object_to_json_string_fn implementation for use with * json_object_to_json_string_fn implementation for use with
* json_object_set_serializer() direct use of this is not * json_object_set_serializer() direct use of this is not
* recommended. * recommended.


+ 1
- 1
tests/test-defs.sh View File

@@ -90,7 +90,7 @@ run_output_test()
fi fi
TEST_COMMAND="$1" TEST_COMMAND="$1"
shift shift
if [ -z "${TEST_OUTPUT}" ] ; then
if [ -z "${TEST_OUTPUT}" ] ; then
TEST_OUTPUT=${TEST_COMMAND} TEST_OUTPUT=${TEST_COMMAND}
fi fi




+ 1
- 1
tests/test_float.c View File

@@ -1,4 +1,4 @@
/* Copyright (C) 2016 by Rainer Gerhards
/* Copyright (C) 2016 by Rainer Gerhards
* Released under ASL 2.0 */ * Released under ASL 2.0 */
#include "config.h" #include "config.h"
#include "json_object.h" #include "json_object.h"


Loading…
Cancel
Save