Re:Show HN: A pure C89 implementation of Go channels, with b...
by eqvinox on Wednesday December 13, 2023 @03:14PM
(#38633553)
Indeed, bool (or _Bool) was added in C99, hence my pointing out it not being used… it's not in C89.
It matters because the return value sense is different; an "int" return for a status-ish thing in a modern library generally means 0 for success, nonzero for error codes. "bool" is the other way around, 0 for failure-y. In this case it's a status retrieval function so it's pretty clear that it's intended as a boolean but it'd still be better to actually make it bool.
It matters because the return value sense is different; an "int" return for a status-ish thing in a modern library generally means 0 for success, nonzero for error codes. "bool" is the other way around, 0 for failure-y. In this case it's a status retrieval function so it's pretty clear that it's intended as a boolean but it'd still be better to actually make it bool.