aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/lib/libbindle/larray.c
diff options
context:
space:
mode:
authorDavid M. Syzdek <david@syzdek.net>2022-08-26 01:18:37 -0800
committerDavid M. Syzdek <david@syzdek.net>2022-08-26 01:18:37 -0800
commitd9b2b311531b3c4a2f955f907f793d5c7b646612 (patch)
treeb552156bcc212964ed5323fee7e1c14a23c0d068 /lib/libbindle/larray.c
parent01cd6447fa116d621024c52b8f3894089adff55c (diff)
downloadbindletools-d9b2b311531b3c4a2f955f907f793d5c7b646612.tar.gz
bindletools-d9b2b311531b3c4a2f955f907f793d5c7b646612.tar.bz2
bindletools-d9b2b311531b3c4a2f955f907f793d5c7b646612.tar.xz
bindletools-d9b2b311531b3c4a2f955f907f793d5c7b646612.zip
libbindle: renaming bindle_array_search() to bindle_bindex()
Diffstat (limited to 'lib/libbindle/larray.c')
-rw-r--r--lib/libbindle/larray.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libbindle/larray.c b/lib/libbindle/larray.c
index eb5287c..cafe37c 100644
--- a/lib/libbindle/larray.c
+++ b/lib/libbindle/larray.c
@@ -110,7 +110,7 @@ bindle_badd(
110 }; 110 };
111 111
112 // search for existing object which matches 112 // search for existing object which matches
113 if ((idx = bindle_array_search(obj, *basep, *nelp, width, opts, &wouldbe, compar)) != -1) 113 if ((idx = bindle_bindex(obj, *basep, *nelp, width, opts, &wouldbe, compar)) != -1)
114 { 114 {
115 if ((opts & BNDL_ARRAY_MASK_ADD) == BNDL_ARRAY_INSERT) 115 if ((opts & BNDL_ARRAY_MASK_ADD) == BNDL_ARRAY_INSERT)
116 return(-1); 116 return(-1);
@@ -168,7 +168,7 @@ bindle_array_get(
168 assert((base != NULL) || (!(nel)) ); 168 assert((base != NULL) || (!(nel)) );
169 assert(key != NULL); 169 assert(key != NULL);
170 assert(width > 0); 170 assert(width > 0);
171 if ((idx = bindle_array_search(key, base, nel, width, opts, NULL, compar)) == -1) 171 if ((idx = bindle_bindex(key, base, nel, width, opts, NULL, compar)) == -1)
172 return(NULL); 172 return(NULL);
173 return(((char *)base) + (width * (size_t)idx)); 173 return(((char *)base) + (width * (size_t)idx));
174} 174}
@@ -215,7 +215,7 @@ bindle_bremove(
215 assert(width > 0); 215 assert(width > 0);
216 216
217 // search for matching object 217 // search for matching object
218 if ((idx = bindle_array_search(key, base, *nelp, width, opts, NULL, compar)) == -1) 218 if ((idx = bindle_bindex(key, base, *nelp, width, opts, NULL, compar)) == -1)
219 return(-1); 219 return(-1);
220 220
221 // free object 221 // free object
@@ -241,7 +241,7 @@ bindle_bremove(
241 241
242 242
243ssize_t 243ssize_t
244bindle_array_search( 244bindle_bindex(
245 const void * key, 245 const void * key,
246 const void * base, 246 const void * base,
247 size_t nel, 247 size_t nel,