From 00c63c342c2d858bf94b6a602dcf8bd696fdbe26 Mon Sep 17 00:00:00 2001 From: Dennis Potman Date: Mon, 17 Jun 2024 12:54:57 +0200 Subject: [PATCH] Export sysdef parser functions Adding export macros to the system definition parser initialization and finalize functions. Signed-off-by: Dennis Potman --- src/core/ddsc/src/dds__sysdef_parser.h | 11 ++++++----- src/core/xtests/symbol_export/symbol_export.c | 8 ++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/src/core/ddsc/src/dds__sysdef_parser.h b/src/core/ddsc/src/dds__sysdef_parser.h index e726979f27..74ed613bfe 100644 --- a/src/core/ddsc/src/dds__sysdef_parser.h +++ b/src/core/ddsc/src/dds__sysdef_parser.h @@ -12,6 +12,7 @@ #include "dds/ddsrt/log.h" #include "dds/ddsrt/retcode.h" +#include "dds/export.h" #if defined (__cplusplus) extern "C" { @@ -85,7 +86,7 @@ struct dds_sysdef_type_metadata_admin; * * @return a DDS return code */ -dds_return_t dds_sysdef_init_sysdef (FILE *fp, struct dds_sysdef_system **sysdef, uint32_t lib_scope); +DDS_EXPORT_INTERNAL_FUNCTION dds_return_t dds_sysdef_init_sysdef (FILE *fp, struct dds_sysdef_system **sysdef, uint32_t lib_scope); /** * @brief Initialize System definition from `xml` string. @@ -100,7 +101,7 @@ dds_return_t dds_sysdef_init_sysdef (FILE *fp, struct dds_sysdef_system **sysdef * * @return a DDS return code */ -dds_return_t dds_sysdef_init_sysdef_str (const char *raw, struct dds_sysdef_system **sysdef, uint32_t lib_scope); +DDS_EXPORT_INTERNAL_FUNCTION dds_return_t dds_sysdef_init_sysdef_str (const char *raw, struct dds_sysdef_system **sysdef, uint32_t lib_scope); /** * @brief Finalize System definition. @@ -112,7 +113,7 @@ dds_return_t dds_sysdef_init_sysdef_str (const char *raw, struct dds_sysdef_syst * @param[in] sysdef - Pointer to dds_sysdef_system structure. * */ -void dds_sysdef_fini_sysdef (struct dds_sysdef_system *sysdef); +DDS_EXPORT_INTERNAL_FUNCTION void dds_sysdef_fini_sysdef (struct dds_sysdef_system *sysdef); /** * @brief Initialize System definition for data types. @@ -126,7 +127,7 @@ void dds_sysdef_fini_sysdef (struct dds_sysdef_system *sysdef); * * @return a DDS return code */ -dds_return_t dds_sysdef_init_data_types (FILE *fp, struct dds_sysdef_type_metadata_admin **type_meta_data); +DDS_EXPORT_INTERNAL_FUNCTION dds_return_t dds_sysdef_init_data_types (FILE *fp, struct dds_sysdef_type_metadata_admin **type_meta_data); /** * @brief Finalize System definition for data types. @@ -138,7 +139,7 @@ dds_return_t dds_sysdef_init_data_types (FILE *fp, struct dds_sysdef_type_metada * @param[in,out] type_meta_data - Pointer dds_sysdef_type_metadata_admin structure. * */ -void dds_sysdef_fini_data_types (struct dds_sysdef_type_metadata_admin *type_meta_data); +DDS_EXPORT_INTERNAL_FUNCTION void dds_sysdef_fini_data_types (struct dds_sysdef_type_metadata_admin *type_meta_data); #if defined (__cplusplus) } diff --git a/src/core/xtests/symbol_export/symbol_export.c b/src/core/xtests/symbol_export/symbol_export.c index 2b8e107c79..ea8cbc4dc5 100644 --- a/src/core/xtests/symbol_export/symbol_export.c +++ b/src/core/xtests/symbol_export/symbol_export.c @@ -92,6 +92,7 @@ #include "dds__write.h" #include "dds__entity.h" +#include "dds__sysdef_parser.h" DDSRT_WARNING_DEPRECATED_OFF DDSRT_WARNING_GNUC_OFF (unused-result) @@ -1169,6 +1170,13 @@ int main (int argc, char **argv) dds_entity_lock (0, 0, ptr); dds_entity_unlock (ptr); + // dds__sysdef_parser.h + dds_sysdef_init_sysdef (ptr, ptr2, 0); + dds_sysdef_init_sysdef_str (ptr, ptr2, 0); + dds_sysdef_fini_sysdef (ptr); + dds_sysdef_init_data_types (ptr, ptr2); + dds_sysdef_fini_data_types (ptr); + return 0; }