Makes a copy of the given error message (and decoded according to the * currently locale) into the wide string pointer pointed by error_str. * The last stored error string is freed. * Use register_error_str(NULL) to free the error message completely. */
| 237 | * The last stored error string is freed. |
| 238 | * Use register_error_str(NULL) to free the error message completely. */ |
| 239 | static void register_error_str(wchar_t **error_str, const char *msg) |
| 240 | { |
| 241 | free(*error_str); |
| 242 | *error_str = utf8_to_wchar_t(msg); |
| 243 | } |
| 244 | |
| 245 | /* Similar to register_error_str, but allows passing a format string with va_list args into this function. */ |
| 246 | static void register_error_str_vformat(wchar_t **error_str, const char *format, va_list args) |
no test coverage detected