2 May
2007
2 May
'07
2:13 a.m.
Issue: There is a confusion regarding *_len input parameters (e.g. error_diag_len for error messages): whether they should include 1 additional byte for '\0' character or not. C binding specification makes it even more ambiguous. It uses the term "buffer length" which might be not clear for a C programmer. Usually "buffer size" means sizeof(buf) and "string length" means that one needs to supply sizeof(buf) - 1 as the argument for function call. It would be good to see some explicit explanation. --------------- sizeof(buf) - 1 is meant to be used, since the programmers expect this behavior. That needs to be clarified in the spec wherever matters to leave no room for ambiguities. -Hrabri