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

c-api: turn const global into define #150

Merged
merged 3 commits into from
Nov 27, 2024
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
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;
VDanielEdwards marked this conversation as resolved.
Show resolved Hide resolved
#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
Loading