From 9a14454d3c5589373253571cee7428c593adefd9 Mon Sep 17 00:00:00 2001 From: Toni Uhlig Date: Thu, 17 Oct 2024 12:16:20 +0200 Subject: Squashed 'dependencies/uthash/' changes from bf152630..f69112c0 f69112c0 utarray: Fix typo in docs 619fe95c Fix MSVC warning C4127 in HASH_BLOOM_TEST (#261) eeba1961 uthash: Improve the docs for HASH_ADD_INORDER ca98384c HASH_DEL should be able to delete a const-qualified node 095425f7 utlist: Add one more assertion in DL_DELETE2 399bf74b utarray: Stop making `oom` a synonym for `utarray_oom` 85bf75ab utarray_str_cpy: Remove strdup; utarray_oom() if strdup fails. 1a53f304 GitHub CI: Also test building the docs (#248) 4d01591e The MCST Elbrus C Compiler supports __typeof. (#247) 1e0baf06 CI: Add GitHub Actions CI 8844b529 Update test57.c per a suggestion by @mark-summerfield 44a66fe8 Update http:// URLs to https://, and copyright dates to 2022. NFC. git-subtree-dir: dependencies/uthash git-subtree-split: f69112c04f1b6e059b8071cb391a1fcc83791a00 --- src/utlist.h | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/utlist.h') diff --git a/src/utlist.h b/src/utlist.h index 1979448a7..08fc59ae6 100644 --- a/src/utlist.h +++ b/src/utlist.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2007-2021, Troy D. Hanson http://troydhanson.github.io/uthash/ +Copyright (c) 2007-2022, Troy D. Hanson https://troydhanson.github.io/uthash/ All rights reserved. Redistribution and use in source and binary forms, with or without @@ -70,6 +70,8 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #else /* VS2008 or older (or VS2010 in C mode) */ #define NO_DECLTYPE #endif +#elif defined(__MCST__) /* Elbrus C Compiler */ +#define LDECLTYPE(x) __typeof(x) #elif defined(__BORLANDC__) || defined(__ICCARM__) || defined(__LCC__) || defined(__WATCOMC__) #define NO_DECLTYPE #else /* GNU, Sun and other compilers */ @@ -709,7 +711,8 @@ do { assert((del)->prev != NULL); \ if ((del)->prev == (del)) { \ (head)=NULL; \ - } else if ((del)==(head)) { \ + } else if ((del) == (head)) { \ + assert((del)->next != NULL); \ (del)->next->prev = (del)->prev; \ (head) = (del)->next; \ } else { \ -- cgit v1.2.3