Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export dds_write_impl #1846

Merged
merged 1 commit into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions cmake/Modules/GenerateExportHeader.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,19 @@ if(_include_file)
# define ${_prefix_name}${_base_name_upper}_INLINE_EXPORT ${_prefix_name}${_base_name_upper}_EXPORT
# endif
#endif

// Some internal functions are exported even though are not part of the API nor
// foreseen to ever be called by a user of the library (unlike some functions
// that are exported for convenience in building tools or even examples, such as
// the AVL tree). One reason for this is that they are useful in instrumenting
// Cyclone DDS with some performance analysis tools, and it is in the interest
// of the projec that such analyses can be done.
//
// There is no guarantee that such internal symbols will remain available or
// that their role will be the same.
#ifndef ${_prefix_name}${_base_name_upper}_EXPORT_INTERNAL_FUNCTION
# define ${_prefix_name}${_base_name_upper}_EXPORT_INTERNAL_FUNCTION ${_prefix_name}${_base_name_upper}_EXPORT
#endif
")

if(_GEHW_CUSTOM_CONTENT_FROM_VARIABLE)
Expand Down
3 changes: 3 additions & 0 deletions src/core/ddsc/src/dds__write.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
#ifndef DDS__WRITE_H
#define DDS__WRITE_H

#include "dds/export.h"

#if defined (__cplusplus)
extern "C" {
#endif
Expand All @@ -29,6 +31,7 @@ typedef enum {
} dds_write_action;

/** @component write_data */
DDS_EXPORT_INTERNAL_FUNCTION
dds_return_t dds_write_impl (dds_writer *wr, const void *data, dds_time_t tstamp, dds_write_action action);

/** @component write_data */
Expand Down
5 changes: 5 additions & 0 deletions src/core/xtests/symbol_export/symbol_export.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,8 @@

#include "dds/cdr/dds_cdrstream.h"

#include "dds__write.h" // dds_write_impl

DDSRT_WARNING_DEPRECATED_OFF

#ifdef DDS_HAS_SECURITY
Expand Down Expand Up @@ -1051,6 +1053,9 @@ int main (int argc, char **argv)
test_ddsrt_vasprintf (ptr, " ");
ddsrt_asprintf (ptr, " ");

// dds__write.h
dds_write_impl (ptr, ptr, 0, (dds_write_action) 0);

return 0;
}

Expand Down