As a general note, we have an ongoing task to get rid of ulong (and
long). So if you're working along and see stuff like this (from
drizzled/function/time/typecast.cc)
snprintf(char_type, sizeof(char_type), "%s(%lu)",
cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
(ulong) cast_length);
Go ahead and change that to (in this case, since cast_length is an int):
snprintf(char_type, sizeof(char_type), "%s(%d)",
cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
cast_length);
However, of course, int may not actually be appropriate for cast_length.
It might should be int32_t, int64_t, uint32_t, uint64_t -- or, if it
needs to vary based on platform (32/64bit stuff), size_t or ssize_t.
Just for completeness, if you had changed it to uint32_t... (guessing,
based on the above casting to ulong)
snprintf(char_type, sizeof(char_type), "%s(%"PRIu32")",
cast_cs == &my_charset_bin ? "BINARY" : "CHAR",
cast_length);
Using the inttypes macros from C99.
Thanks!
Monty
_______________________________________________
Mailing list: https://launchpad.net/~drizzle-discuss
Post to : [email protected]
Unsubscribe : https://launchpad.net/~drizzle-discuss
More help : https://help.launchpad.net/ListHelp