From a6821a6cb8b070af6024c76d97197b6601d99648 Mon Sep 17 00:00:00 2001 From: Gabor Kiss-Vamosi Date: Mon, 25 Feb 2019 15:21:41 +0100 Subject: [PATCH] lv_i18n: update void returns to char --- lv_core/lv_i18n.c | 6 +++--- lv_core/lv_i18n.h | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lv_core/lv_i18n.c b/lv_core/lv_i18n.c index 1a75869de..c7fdb647d 100644 --- a/lv_core/lv_i18n.c +++ b/lv_core/lv_i18n.c @@ -97,7 +97,7 @@ int lv_i18n_set_local(const char * lang_code) * @param msg_id message ID * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text(const char * msg_id) +const char * lv_i18n_get_text(const char * msg_id) { if(local_lang == NULL) { LV_LOG_WARN("lv_i18n_get_text: No language selected"); @@ -154,7 +154,7 @@ const void * lv_i18n_get_text(const char * msg_id) * @param num an integer to select the correct plural form * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) +const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num) { if(local_lang == NULL) { LV_LOG_WARN("lv_i18n_get_text_plural: No language selected"); @@ -228,7 +228,7 @@ const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num) * Get the name of the currently used localization. * @return name of the currently used localization. E.g. "en_GB" */ -const void * lv_i18n_get_current_local(void) +const char * lv_i18n_get_current_local(void) { if(local_lang) return local_lang->name; else return NULL; diff --git a/lv_core/lv_i18n.h b/lv_core/lv_i18n.h index 894213bc0..15b822c41 100644 --- a/lv_core/lv_i18n.h +++ b/lv_core/lv_i18n.h @@ -79,7 +79,7 @@ int lv_i18n_set_local(const char * lang_code); * @param msg_id message ID * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text(const char * msg_id); +const char * lv_i18n_get_text(const char * msg_id); /** * Get the translation from a message ID and apply the language's plural rule to get correct form @@ -87,13 +87,13 @@ const void * lv_i18n_get_text(const char * msg_id); * @param num an integer to select the correct plural form * @return the translation of `msg_id` on the set local */ -const void * lv_i18n_get_text_plural(const char * msg_id, int32_t num); +const char * lv_i18n_get_text_plural(const char * msg_id, int32_t num); /** * Get the name of the currently used localization. * @return name of the currently used localization. E.g. "en_GB" */ -const void * lv_i18n_get_current_local(void); +const char * lv_i18n_get_current_local(void); /********************** * MACROS