From a6a9cffcb46f49926d231e465de14c8d74c82197 Mon Sep 17 00:00:00 2001 From: Brice Videau Date: Mon, 20 May 2024 12:56:27 -0500 Subject: [PATCH] Factor object user data serialization. --- src/cconfigspace_internal.h | 8 ++++++-- src/configuration.c | 4 ---- src/configuration_space.c | 4 ---- src/distribution_mixture.c | 4 ---- src/distribution_multivariate.c | 4 ---- src/distribution_normal.c | 6 ++---- src/distribution_roulette.c | 6 ++---- src/distribution_space.c | 10 ---------- src/distribution_uniform.c | 6 ++---- src/evaluation.c | 4 ---- src/expression.c | 12 ------------ src/feature_space.c | 4 ---- src/features.c | 6 ++---- src/map.c | 12 ++---------- src/objective_space.c | 4 ---- src/parameter_categorical.c | 6 ++---- src/parameter_numerical.c | 6 ++---- src/parameter_string.c | 6 ++---- src/rng.c | 12 ++---------- src/tree.c | 4 ---- src/tree_configuration.c | 4 ---- src/tree_space_dynamic.c | 4 ---- src/tree_space_static.c | 4 ---- src/tuner_random.c | 4 ---- src/tuner_user_defined.c | 4 ---- 25 files changed, 24 insertions(+), 124 deletions(-) diff --git a/src/cconfigspace_internal.h b/src/cconfigspace_internal.h index 8ae05196..9a91d4ef 100644 --- a/src/cconfigspace_internal.h +++ b/src/cconfigspace_internal.h @@ -1403,12 +1403,14 @@ static inline ccs_result_t _ccs_object_serialize_size_with_opts( ccs_object_t object, ccs_serialize_format_t format, - size_t *buffer_size, + size_t *cum_size, _ccs_object_serialize_options_t *opts) { _ccs_object_internal_t *obj = (_ccs_object_internal_t *)object; CCS_VALIDATE( - obj->ops->serialize_size(object, format, buffer_size, opts)); + obj->ops->serialize_size(object, format, cum_size, opts)); + CCS_VALIDATE(_ccs_object_serialize_user_data_size( + object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -1423,6 +1425,8 @@ _ccs_object_serialize_with_opts( _ccs_object_internal_t *obj = (_ccs_object_internal_t *)object; CCS_VALIDATE( obj->ops->serialize(object, format, buffer_size, buffer, opts)); + CCS_VALIDATE(_ccs_object_serialize_user_data( + object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/configuration.c b/src/configuration.c index 7c9c8c68..43f5aa60 100644 --- a/src/configuration.c +++ b/src/configuration.c @@ -93,8 +93,6 @@ _ccs_configuration_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -117,8 +115,6 @@ _ccs_configuration_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/configuration_space.c b/src/configuration_space.c index 8c59e95c..58f262a9 100644 --- a/src/configuration_space.c +++ b/src/configuration_space.c @@ -220,8 +220,6 @@ _ccs_configuration_space_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -244,8 +242,6 @@ _ccs_configuration_space_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/distribution_mixture.c b/src/distribution_mixture.c index 46156124..74cfa372 100644 --- a/src/distribution_mixture.c +++ b/src/distribution_mixture.c @@ -116,8 +116,6 @@ _ccs_distribution_mixture_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -139,8 +137,6 @@ _ccs_distribution_mixture_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/distribution_multivariate.c b/src/distribution_multivariate.c index 212be219..1737f240 100644 --- a/src/distribution_multivariate.c +++ b/src/distribution_multivariate.c @@ -110,8 +110,6 @@ _ccs_distribution_multivariate_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -133,8 +131,6 @@ _ccs_distribution_multivariate_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/distribution_normal.c b/src/distribution_normal.c index 854bebb5..55ca85fd 100644 --- a/src/distribution_normal.c +++ b/src/distribution_normal.c @@ -97,6 +97,7 @@ _ccs_distribution_normal_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_distribution_normal( @@ -107,8 +108,6 @@ _ccs_distribution_normal_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -120,6 +119,7 @@ _ccs_distribution_normal_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_distribution_normal( @@ -130,8 +130,6 @@ _ccs_distribution_normal_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/distribution_roulette.c b/src/distribution_roulette.c index 3f28c082..54c2dbf9 100644 --- a/src/distribution_roulette.c +++ b/src/distribution_roulette.c @@ -83,6 +83,7 @@ _ccs_distribution_roulette_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_distribution_roulette( @@ -93,8 +94,6 @@ _ccs_distribution_roulette_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -106,6 +105,7 @@ _ccs_distribution_roulette_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_distribution_roulette( @@ -116,8 +116,6 @@ _ccs_distribution_roulette_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/distribution_space.c b/src/distribution_space.c index de5235f8..47c829cd 100644 --- a/src/distribution_space.c +++ b/src/distribution_space.c @@ -132,11 +132,6 @@ _ccs_distribution_space_serialize_size( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data_size( - object, format, cum_size, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; @@ -166,11 +161,6 @@ _ccs_distribution_space_serialize( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; diff --git a/src/distribution_uniform.c b/src/distribution_uniform.c index 83f78150..db7d9560 100644 --- a/src/distribution_uniform.c +++ b/src/distribution_uniform.c @@ -108,6 +108,7 @@ _ccs_distribution_uniform_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_distribution_uniform( @@ -118,8 +119,6 @@ _ccs_distribution_uniform_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -131,6 +130,7 @@ _ccs_distribution_uniform_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_distribution_uniform( @@ -141,8 +141,6 @@ _ccs_distribution_uniform_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/evaluation.c b/src/evaluation.c index 97890f07..1f5bb9b7 100644 --- a/src/evaluation.c +++ b/src/evaluation.c @@ -97,8 +97,6 @@ _ccs_evaluation_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -120,8 +118,6 @@ _ccs_evaluation_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/expression.c b/src/expression.c index de70a429..eb9697cd 100644 --- a/src/expression.c +++ b/src/expression.c @@ -181,8 +181,6 @@ _ccs_expression_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -204,8 +202,6 @@ _ccs_expression_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } @@ -1128,8 +1124,6 @@ _ccs_expression_literal_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -1151,8 +1145,6 @@ _ccs_expression_literal_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } @@ -1257,8 +1249,6 @@ _ccs_expression_variable_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -1280,8 +1270,6 @@ _ccs_expression_variable_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/feature_space.c b/src/feature_space.c index b2d034e5..7d75ae28 100644 --- a/src/feature_space.c +++ b/src/feature_space.c @@ -39,8 +39,6 @@ _ccs_feature_space_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -62,8 +60,6 @@ _ccs_feature_space_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/features.c b/src/features.c index 81f2ddc8..7fd4358f 100644 --- a/src/features.c +++ b/src/features.c @@ -20,6 +20,7 @@ _ccs_features_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_size_ccs_binding( @@ -30,8 +31,6 @@ _ccs_features_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -43,6 +42,7 @@ _ccs_features_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_binding( @@ -53,8 +53,6 @@ _ccs_features_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/map.c b/src/map.c index 904b75f1..2a7d009e 100644 --- a/src/map.c +++ b/src/map.c @@ -106,6 +106,7 @@ _ccs_map_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; ccs_result_t err = CCS_RESULT_SUCCESS; CCS_OBJ_RDLOCK(object); switch (format) { @@ -117,11 +118,6 @@ _ccs_map_serialize_size( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data_size( - object, format, cum_size, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; @@ -135,6 +131,7 @@ _ccs_map_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; ccs_result_t err = CCS_RESULT_SUCCESS; CCS_OBJ_RDLOCK(object); switch (format) { @@ -150,11 +147,6 @@ _ccs_map_serialize( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; diff --git a/src/objective_space.c b/src/objective_space.c index 791c0413..bfd3a31c 100644 --- a/src/objective_space.c +++ b/src/objective_space.c @@ -171,8 +171,6 @@ _ccs_objective_space_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -195,8 +193,6 @@ _ccs_objective_space_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/parameter_categorical.c b/src/parameter_categorical.c index e7d4c4e9..cc56b902 100644 --- a/src/parameter_categorical.c +++ b/src/parameter_categorical.c @@ -84,6 +84,7 @@ _ccs_parameter_categorical_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_parameter_categorical( @@ -94,8 +95,6 @@ _ccs_parameter_categorical_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -107,6 +106,7 @@ _ccs_parameter_categorical_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_parameter_categorical( @@ -117,8 +117,6 @@ _ccs_parameter_categorical_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/parameter_numerical.c b/src/parameter_numerical.c index 645b518f..c0a86dce 100644 --- a/src/parameter_numerical.c +++ b/src/parameter_numerical.c @@ -41,6 +41,7 @@ _ccs_parameter_numerical_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_parameter_numerical( @@ -51,8 +52,6 @@ _ccs_parameter_numerical_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -64,6 +63,7 @@ _ccs_parameter_numerical_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_parameter_numerical( @@ -74,8 +74,6 @@ _ccs_parameter_numerical_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/parameter_string.c b/src/parameter_string.c index 19bb7728..4510312d 100644 --- a/src/parameter_string.c +++ b/src/parameter_string.c @@ -82,6 +82,7 @@ _ccs_parameter_string_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: *cum_size += _ccs_serialize_bin_size_ccs_parameter_string( @@ -92,8 +93,6 @@ _ccs_parameter_string_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -105,6 +104,7 @@ _ccs_parameter_string_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; switch (format) { case CCS_SERIALIZE_FORMAT_BINARY: CCS_VALIDATE(_ccs_serialize_bin_ccs_parameter_string( @@ -115,8 +115,6 @@ _ccs_parameter_string_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/rng.c b/src/rng.c index 025a15ec..0aeaaba9 100644 --- a/src/rng.c +++ b/src/rng.c @@ -61,6 +61,7 @@ _ccs_rng_serialize_size( size_t *cum_size, _ccs_object_serialize_options_t *opts) { + (void)opts; ccs_result_t err = CCS_RESULT_SUCCESS; CCS_OBJ_RDLOCK(object); switch (format) { @@ -72,11 +73,6 @@ _ccs_rng_serialize_size( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data_size( - object, format, cum_size, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; @@ -90,6 +86,7 @@ _ccs_rng_serialize( char **buffer, _ccs_object_serialize_options_t *opts) { + (void)opts; ccs_result_t err = CCS_RESULT_SUCCESS; CCS_OBJ_RDLOCK(object); switch (format) { @@ -105,11 +102,6 @@ _ccs_rng_serialize( err, CCS_RESULT_ERROR_INVALID_VALUE, end, "Unsupported serialization format: %d", format); } - CCS_VALIDATE_ERR_GOTO( - err, - _ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts), - end); end: CCS_OBJ_UNLOCK(object); return err; diff --git a/src/tree.c b/src/tree.c index c2ae9dce..ff5e51ac 100644 --- a/src/tree.c +++ b/src/tree.c @@ -106,8 +106,6 @@ _ccs_tree_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -129,8 +127,6 @@ _ccs_tree_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/tree_configuration.c b/src/tree_configuration.c index 6eb4ceab..05d62400 100644 --- a/src/tree_configuration.c +++ b/src/tree_configuration.c @@ -102,8 +102,6 @@ _ccs_tree_configuration_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -126,8 +124,6 @@ _ccs_tree_configuration_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/tree_space_dynamic.c b/src/tree_space_dynamic.c index 0ff18d36..53706209 100644 --- a/src/tree_space_dynamic.c +++ b/src/tree_space_dynamic.c @@ -118,8 +118,6 @@ _ccs_tree_space_dynamic_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -141,8 +139,6 @@ _ccs_tree_space_dynamic_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/tree_space_static.c b/src/tree_space_static.c index d31ccda8..33953e46 100644 --- a/src/tree_space_static.c +++ b/src/tree_space_static.c @@ -93,8 +93,6 @@ _ccs_tree_space_static_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -116,8 +114,6 @@ _ccs_tree_space_static_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/tuner_random.c b/src/tuner_random.c index d4661234..7e2c76a0 100644 --- a/src/tuner_random.c +++ b/src/tuner_random.c @@ -124,8 +124,6 @@ _ccs_tuner_random_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -147,8 +145,6 @@ _ccs_tuner_random_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; } diff --git a/src/tuner_user_defined.c b/src/tuner_user_defined.c index 214a5a73..d81670c7 100644 --- a/src/tuner_user_defined.c +++ b/src/tuner_user_defined.c @@ -199,8 +199,6 @@ _ccs_tuner_user_defined_serialize_size( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data_size( - object, format, cum_size, opts)); return CCS_RESULT_SUCCESS; } @@ -222,8 +220,6 @@ _ccs_tuner_user_defined_serialize( CCS_RESULT_ERROR_INVALID_VALUE, "Unsupported serialization format: %d", format); } - CCS_VALIDATE(_ccs_object_serialize_user_data( - object, format, buffer_size, buffer, opts)); return CCS_RESULT_SUCCESS; }