From dec7caafd0979aabc65082feb625f711f6d820b9 Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 15 Oct 2016 00:17:31 +1100 Subject: [PATCH] Change 'name' argument of find_fixed_array_item() to const char * --- include/alist.h | 2 +- include/modval.h | 2 +- source/alist.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/alist.h b/include/alist.h index 2fff1a7..0920efa 100644 --- a/include/alist.h +++ b/include/alist.h @@ -111,6 +111,6 @@ Array_item *BX_remove_all_from_array (Array *, char *); Array_item *BX_array_lookup (Array *, char *, int wild, int delete); Array_item *BX_find_array_item (Array *, char *, int *cnt, int *loc); -void *BX_find_fixed_array_item (void *Array, size_t size, int siz, char *, int *cnt, int *loc); +void *BX_find_fixed_array_item (void *Array, size_t size, int siz, const char *, int *cnt, int *loc); #endif diff --git a/include/modval.h b/include/modval.h index 1cc5eb1..f6f909c 100644 --- a/include/modval.h +++ b/include/modval.h @@ -245,7 +245,7 @@ extern Function_ptr *global; #define array_lookup (*(Array_item *(*)(Array *, char *, int, int ))global[ARRAY_LOOKUP]) #define find_array_item (*(Array_item *(*)(Array *, char *, int *, int *))global[FIND_ARRAY_ITEM]) -#define find_fixed_array_item (*(void *(*)(void *, size_t, int, char *, int *, int *))global[FIND_FIXED_ARRAY_ITEM]) +#define find_fixed_array_item (*(void *(*)(void *, size_t, int, const char *, int *, int *))global[FIND_FIXED_ARRAY_ITEM]) /* output.c */ #define put_it (*(void (*)(const char *, ...))global[PUT_IT]) diff --git a/source/alist.c b/source/alist.c index bfafffd..bd0a7b9 100644 --- a/source/alist.c +++ b/source/alist.c @@ -351,7 +351,7 @@ Array_item *BX_find_array_item (Array *set, char *name, int *cnt, int *loc) * This code is identical to find_array_item except ``list'' is a 1st * level array instead of a 2nd level array. */ -void * BX_find_fixed_array_item (void *list, size_t size, int howmany, char *name, int *cnt, int *loc) +void * BX_find_fixed_array_item (void *list, size_t size, int howmany, const char *name, int *cnt, int *loc) { int len = strlen(name), min = 0,