# HG changeset patch # User John W. Eaton # Date 1629263195 14400 # Node ID 4628ae890642e42c0f1b5996f472342842510b9e # Parent eb768fc5e6b784136ca8b0f1f18b2dcc20599efe 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. diff -r eb768fc5e6b7 -r 4628ae890642 libinterp/corefcn/jsondecode.cc --- 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 #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})