comparison src/hashtab.c @ 27018:268f6a3511df v8.2.4038

patch 8.2.4038: various code not used when features are disabled Commit: https://github.com/vim/vim/commit/748b308eebe8d8860888eb27da08333f175d547d Author: Dominique Pelle <dominique.pelle@gmail.com> Date: Sat Jan 8 12:41:16 2022 +0000 patch 8.2.4038: various code not used when features are disabled Problem: Various code not used when features are disabled. Solution: Add #ifdefs. (Dominique Pell?, closes https://github.com/vim/vim/issues/9491)
author Bram Moolenaar <Bram@vim.org>
date Sat, 08 Jan 2022 13:45:04 +0100
parents 4ed106deb772
children 3ad379c0ab28
comparison
equal deleted inserted replaced
27017:da790d50f73d 27018:268f6a3511df
286 hash_lock(hashtab_T *ht) 286 hash_lock(hashtab_T *ht)
287 { 287 {
288 ++ht->ht_locked; 288 ++ht->ht_locked;
289 } 289 }
290 290
291 #if defined(FEAT_PROP_POPUP) || defined(PROTO)
291 /* 292 /*
292 * Lock a hashtable at the specified number of entries. 293 * Lock a hashtable at the specified number of entries.
293 * Caller must make sure no more than "size" entries will be added. 294 * Caller must make sure no more than "size" entries will be added.
294 * Must call hash_unlock() later. 295 * Must call hash_unlock() later.
295 */ 296 */
297 hash_lock_size(hashtab_T *ht, int size) 298 hash_lock_size(hashtab_T *ht, int size)
298 { 299 {
299 (void)hash_may_resize(ht, size); 300 (void)hash_may_resize(ht, size);
300 ++ht->ht_locked; 301 ++ht->ht_locked;
301 } 302 }
303 #endif
302 304
303 /* 305 /*
304 * Unlock a hashtable: allow ht_array changes again. 306 * Unlock a hashtable: allow ht_array changes again.
305 * Table will be resized (shrink) when necessary. 307 * Table will be resized (shrink) when necessary.
306 * This must balance a call to hash_lock(). 308 * This must balance a call to hash_lock().