mirror of
https://github.com/MidnightCommander/mc
synced 2025-03-11 18:32:53 +03:00
button_get_text() shouldn't return 'const'.
As it's a newly allocated string which the caller needs to free. Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
2627da4b73
commit
5fad7508c5
@ -222,7 +222,7 @@ button_new (int y, int x, int action, button_flags_t flags, const char *text, bc
|
||||
|
||||
/* --------------------------------------------------------------------------------------------- */
|
||||
|
||||
const char *
|
||||
char *
|
||||
button_get_text (const WButton * b)
|
||||
{
|
||||
if (b->text.hotkey != NULL)
|
||||
|
@ -46,7 +46,7 @@ typedef struct WButton
|
||||
|
||||
WButton *button_new (int y, int x, int action, button_flags_t flags, const char *text,
|
||||
bcback_fn callback);
|
||||
const char *button_get_text (const WButton * b);
|
||||
char *button_get_text (const WButton * b);
|
||||
void button_set_text (WButton * b, const char *text);
|
||||
int button_get_len (const WButton * b);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user