commit 44b80b2a7a1b2a4866267ca7d7bda11ae926a4bb
Author: Turo Lamminen <turotl@gmail.com>
AuthorDate: Tue Mar 6 18:45:08 2018 +0200
Commit: Turo Lamminen <turotl@gmail.com>
CommitDate: Tue Mar 13 19:33:47 2018 +0200
Make TXT_SetButtonLabel label parameter const
---
textscreen/txt_button.c | 2 +-
textscreen/txt_button.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/textscreen/txt_button.c b/textscreen/txt_button.c
index 8865e1a4..688f3db3 100644
--- a/textscreen/txt_button.c
+++ b/textscreen/txt_button.c
@@ -93,7 +93,7 @@ txt_widget_class_t txt_button_class =
NULL,
};
-void TXT_SetButtonLabel(txt_button_t *button, char *label)
+void TXT_SetButtonLabel(txt_button_t *button, const char *label)
{
free(button->label);
button->label = strdup(label);
diff --git a/textscreen/txt_button.h b/textscreen/txt_button.h
index cde528f6..5350798d 100644
--- a/textscreen/txt_button.h
+++ b/textscreen/txt_button.h
@@ -67,7 +67,7 @@ txt_button_t *TXT_NewButton2(char *label, TxtWidgetSignalFunc func,
* @param label The new label (UTF-8 format).
*/
-void TXT_SetButtonLabel(txt_button_t *button, char *label);
+void TXT_SetButtonLabel(txt_button_t *button, const char *label);
#endif /* #ifndef TXT_BUTTON_H */