Ricardo Cañuelo <ricardo.canuelo@xxxxxxxxxxxxx> writes: > I don't think it's a good idea to have the version specifier hardcoded twice in > the same file, one in string form (for utf8_load) and another one in integer > form (for the rest of the functions that take the version as a parameter). I > think it'd be a better option to use a macro to stringify the version number > from the integer constants and avoid the snprintf entirely: > > #define str(s) #s > #define VERSION_STR(maj, min, rev) str(maj) "." str(min) "." str(rev) > > ... > > table = utf8_load(VERSION_STR(latest_maj, latest_min, latest_rev)); > > > This way we can define the version constant only once, in integer form, and > then the string form will be a constant generated at compile time. Are you ok > with this? fine with me. Thanks, -- Gabriel Krisman Bertazi