Mercurial > octave
changeset 29995:4628ae890642
move jsondecode functions to octave namespace and make local functions static
There is no public header file for the functions defined in
jsondecode.cc so making all local functions in that file static should
not affect users.
* jsondecode.cc: Move all functions inside octave namespace. Declare
all local functions static.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Wed, 18 Aug 2021 01:06:35 -0400 |
parents | eb768fc5e6b7 |
children | c4bc77a90fb5 |
files | libinterp/corefcn/jsondecode.cc |
diffstat | 1 files changed, 12 insertions(+), 12 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/jsondecode.cc Wed Aug 18 14:56:07 2021 +0900 +++ b/libinterp/corefcn/jsondecode.cc Wed Aug 18 01:06:35 2021 -0400 @@ -39,9 +39,11 @@ # include <rapidjson/error/en.h> #endif +OCTAVE_NAMESPACE_BEGIN + #if defined (HAVE_RAPIDJSON) -octave_value +static octave_value decode (const rapidjson::Value& val, const octave::make_valid_name_options* options); @@ -59,7 +61,7 @@ //! octave_value num = decode_number (d); //! @endcode -octave_value +static octave_value decode_number (const rapidjson::Value& val) { if (val.IsUint ()) @@ -91,7 +93,7 @@ //! octave_value struct = decode_object (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode_object (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -125,7 +127,7 @@ //! octave_value numeric_array = decode_numeric_array (d); //! @endcode -octave_value +static octave_value decode_numeric_array (const rapidjson::Value& val) { NDArray retval (dim_vector (val.Size (), 1)); @@ -150,7 +152,7 @@ //! octave_value boolean_array = decode_boolean_array (d); //! @endcode -octave_value +static octave_value decode_boolean_array (const rapidjson::Value& val) { boolNDArray retval (dim_vector (val.Size (), 1)); @@ -184,7 +186,7 @@ //! octave_value cell = decode_string_and_mixed_array (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode_string_and_mixed_array (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -220,7 +222,7 @@ //! octave_value object_array = decode_object_array (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode_object_array (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -286,7 +288,7 @@ //! octave_value cell = decode_array_of_arrays (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode_array_of_arrays (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -396,7 +398,7 @@ //! octave_value array = decode_array (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode_array (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -459,7 +461,7 @@ //! octave_value value = decode (d, octave_value_list ()); //! @endcode -octave_value +static octave_value decode (const rapidjson::Value& val, const octave::make_valid_name_options* options) { @@ -481,8 +483,6 @@ #endif -OCTAVE_NAMESPACE_BEGIN - DEFUN (jsondecode, args, , doc: /* -*- texinfo -*- @deftypefn {} {@var{object} =} jsondecode (@var{JSON_txt})