aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/external/lua-5.4.0/src/loadlib.c
diff options
context:
space:
mode:
author lemon<lsof@mailbox.org>2026-04-14 18:40:42 +0200
committer lemon<lsof@mailbox.org>2026-04-14 18:40:42 +0200
commitcbf1018b21ea2a060a3825fbdb1453800b5b7320 (patch)
tree1a0f753f16fa93c8c0fbc62f4c8c83c7f622d4ab /test/external/lua-5.4.0/src/loadlib.c
parent98222b7c0506b0a9833230177b939f8c25046b31 (diff)
c: make type of conditional expr with pointers match non void pointer
Here's what the C standard[1] says about the conditional operator: ``` if one operand is a null pointer constant, the result has the type of the other operand; otherwise, one operand is a pointer to void or a qualified version of void, in which case the result type is a pointer to an appropriately qualified version of void. `` But actually, some codebases rely on things like 'x ? &foo.memb : NULL' to have the type of `&foo.memb`, and not `void *`... [1]: ISO/IEC 9899:TC3 ยง6.5.15
Diffstat (limited to 'test/external/lua-5.4.0/src/loadlib.c')
0 files changed, 0 insertions, 0 deletions