From d6cc7943bfe4757eac793732122fecb10f25eec4 Mon Sep 17 00:00:00 2001 From: Emerson Knapp Date: Wed, 1 Feb 2023 14:48:51 -0800 Subject: [PATCH] Add extra note in docstring about terminating null character Signed-off-by: Emerson Knapp --- rcl/include/rcl/type_version_hash.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/rcl/include/rcl/type_version_hash.h b/rcl/include/rcl/type_version_hash.h index dac613afa..53ee5e75b 100644 --- a/rcl/include/rcl/type_version_hash.h +++ b/rcl/include/rcl/type_version_hash.h @@ -39,7 +39,9 @@ extern "C" * * \param[in] type_description Prefilled TypeDescription message to be translated * \param[out] output_repr An initialized empty char array that will be filled with - * the JSON representation of type_description + * the JSON representation of type_description. Note that output_repr will have a + * terminating null character, which should be omitted from hashing. To do so, use + * (output_repr.buffer_length - 1) or strlen(output_repr.buffer) for the size of data to hash. * \return RCL_RET_OK on success, RCL_RET_ERROR if any problems occur in translation */ RCL_PUBLIC