Skip to content

Commit

Permalink
Make g_rcutils_log_severity_names public and immutable. (#180)
Browse files Browse the repository at this point in the history
Signed-off-by: Michel Hidalgo <[email protected]>
  • Loading branch information
hidmic authored Sep 13, 2019
1 parent 6883279 commit e70143a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion include/rcutils/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,8 @@ enum RCUTILS_LOG_SEVERITY
};

/// The names of severity levels.
extern const char * g_rcutils_log_severity_names[RCUTILS_LOG_SEVERITY_FATAL + 1];
RCUTILS_PUBLIC
extern const char * const g_rcutils_log_severity_names[RCUTILS_LOG_SEVERITY_FATAL + 1];

/// Get a severity value from its string representation (e.g. DEBUG).
/**
Expand Down
2 changes: 1 addition & 1 deletion src/logging.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ extern "C"

#define RCUTILS_LOGGING_MAX_OUTPUT_FORMAT_LEN (2048)

const char * g_rcutils_log_severity_names[] = {
const char * const g_rcutils_log_severity_names[] = {
[RCUTILS_LOG_SEVERITY_UNSET] = "UNSET",
[RCUTILS_LOG_SEVERITY_DEBUG] = "DEBUG",
[RCUTILS_LOG_SEVERITY_INFO] = "INFO",
Expand Down

0 comments on commit e70143a

Please sign in to comment.