Skip to content

fix: stringify __LINE__ macro to avoid overflow#56

Open
Jxcob-R wants to merge 2 commits into
rxi:masterfrom
Jxcob-R:patch-line-no
Open

fix: stringify __LINE__ macro to avoid overflow#56
Jxcob-R wants to merge 2 commits into
rxi:masterfrom
Jxcob-R:patch-line-no

Conversation

@Jxcob-R

@Jxcob-R Jxcob-R commented Nov 9, 2025

Copy link
Copy Markdown

Currently, the expansion for the __LINE__ macro is type int which may be uncomfortably small on 32-bit machines or other platforms where int is smaller.

The work around is a bit silly (as macros are), however, less dangerous than a potentially uncaught integer overflow in large source files.

A good middle ground might just to be making line a long, although this again technically has the possibility of overflowing on rather large files.

Update log_Event line member type, log_log function signature and
relevant print statements compatible with new change.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant