Skip to content

Commit

Permalink
c-api: turn const global into define (#150)
Browse files Browse the repository at this point in the history
Issue: SILKIT-1654
  • Loading branch information
VDanielEdwards authored Nov 27, 2024
1 parent d23f3a2 commit 8eb649d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion SilKit/include/silkit/capi/Lin.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ typedef uint8_t SilKit_LinFrameStatus;
typedef uint8_t SilKit_LinDataLength;

//! \brief If configured for reception with this value, the data length validation of incoming frames is skipped.
const SilKit_LinDataLength SilKit_LinDataLengthUnknown = 255u;
#define SilKit_LinDataLengthUnknown ((SilKit_LinDataLength)255)

/*! \brief A LIN SilKit_LinFrame
*
Expand Down
10 changes: 10 additions & 0 deletions docs/CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,16 @@ The format is based on `Keep a Changelog (http://keepachangelog.com/en/1.0.0/) <
[4.0.55] - Unreleased
---------------------

Fixed
~~~~~

- **Important** ``SilKit_LinDataLengthUnknown`` in the C header ``Lin.h`` used to be a ``const`` global, which could cause
linker issues if the header file is used in multiple translation units in the same binary.

It has been turned into a ``#define``, like all the other constants in the C header files.

The symbol was not present in the dynamic symbol table of the ``SilKit.dll`` / ``.so``, so this change
does not break the ABI of the shared libraries.


[4.0.54] - 2024-11-11
Expand Down

0 comments on commit 8eb649d

Please sign in to comment.