Changed the signature of wofi_create_widget() to use arrays instead of pointers

This commit is contained in:
Scoopta 2020-02-01 17:44:00 -08:00
parent 7494cb1c7c
commit 5538191317
2 changed files with 2 additions and 2 deletions

View File

@ -40,7 +40,7 @@ void wofi_remove_cache(struct mode* mode, const char* cmd);
struct wl_list* wofi_read_cache(struct mode* mode); struct wl_list* wofi_read_cache(struct mode* mode);
struct widget* wofi_create_widget(struct mode* mode, char** text, char* search_text, char** actions, size_t action_count); struct widget* wofi_create_widget(struct mode* mode, char* text[], char* search_text, char* actions[], size_t action_count);
void wofi_insert_widgets(struct mode* mode); void wofi_insert_widgets(struct mode* mode);

View File

@ -625,7 +625,7 @@ struct wl_list* wofi_read_cache(struct mode* mode) {
return cache; return cache;
} }
struct widget* wofi_create_widget(struct mode* mode, char** text, char* search_text, char** actions, size_t action_count) { struct widget* wofi_create_widget(struct mode* mode, char* text[], char* search_text, char* actions[], size_t action_count) {
struct widget* widget = malloc(sizeof(struct widget)); struct widget* widget = malloc(sizeof(struct widget));
widget->mode = strdup(mode->name); widget->mode = strdup(mode->name);
widget->text = malloc(action_count * sizeof(char*)); widget->text = malloc(action_count * sizeof(char*));