You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following #55 I realized that there was no way to check if the new crc_calc() function pointer was defined by the user or not, since there is no guarantee that the user initializes the nmbs_platform_conf struct to zero.
For this reason, with #64 (which marks version 1.18.0), I introduced 2 new _create() APIs that the user must call to create the nmbs_platform_conf and nmbs_callbacks struct, nmbs_platform_conf_create() and nmbs_callbacks_create().
To force the usage of these functions inside old codebases, I introduced a runtime check inside nmbs_create() and nmbs_server_create() returning NMBS_ERROR_INVALID_ARGUMENT when one of these structs is not initialized properly.
The text was updated successfully, but these errors were encountered:
Following #55 I realized that there was no way to check if the new
crc_calc()
function pointer was defined by the user or not, since there is no guarantee that the user initializes thenmbs_platform_conf
struct to zero.For this reason, with #64 (which marks version 1.18.0), I introduced 2 new
_create()
APIs that the user must call to create thenmbs_platform_conf
andnmbs_callbacks
struct,nmbs_platform_conf_create()
andnmbs_callbacks_create()
.To force the usage of these functions inside old codebases, I introduced a runtime check inside
nmbs_create()
andnmbs_server_create()
returningNMBS_ERROR_INVALID_ARGUMENT
when one of these structs is not initialized properly.The text was updated successfully, but these errors were encountered: