- Jul 10, 2023
-
-
Arthur O'Dwyer authored
-
- Dec 13, 2022
-
-
Arthur O'Dwyer authored
HASH_DEL doesn't need to modify the target node; in fact it should not, because that target node is usually going straight back to `free` and any modifications to it would be wasted effort. So, let's make that an actual tested guarantee, and let's make it const-correct. Inspired by the discussion in #253.
-
- Nov 29, 2022
-
-
Arthur O'Dwyer authored
Fixes #252.
-
- Nov 08, 2022
-
-
Arthur O'Dwyer authored
We changed `-Doom=...` to `-Dutarray_oom=...` in commit cfc95dbe, part of the uthash 2.1.0 release (Dec 2018). Since then, we've had uthash 2.2.0 (Dec 2020) and 2.3.0 (Feb 2021). I think that's enough time for people to update their projects. Remove the backward-compatibility hack `#define utarray_oom oom`.
-
Arthur O'Dwyer authored
Fixes #250, #216, #184.
-
- Oct 03, 2022
-
-
Arthur O'Dwyer authored
Thanks to @aloisklink for the patch!
-
- Sep 26, 2022
-
-
Arthur O'Dwyer authored
The trick here is that MCST's compiler is also colloquially known as "LCC", so it defines `__LCC__`; so we'd think it was the [Retargetable C Compiler](https://drh.github.io/lcc/) and assume it had no `__typeof`. Check for `__MCST__` before checking for `__LCC__`. Thanks to @utf-4096 for the patch!
-
Alois Klink authored
Add a basic GitHub Actions CI action that copies ".travis.yml". Fixes #243.
-
- Jun 21, 2022
-
-
Arthur O'Dwyer authored
Use a non-null `someaddr`, and use more thorough asserts instead of a single printf so that we get a bit more test coverage here.
-
- Jan 30, 2022
-
-
Arthur O'Dwyer authored
-
- Jun 05, 2021
-
-
Arthur O'Dwyer authored
-
- Jun 04, 2021
-
-
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
Thanks to @pdebuyl for the outline of this patch!
-
- May 27, 2021
-
-
Guangyao Ma authored
-
- Mar 02, 2021
-
-
Troy D. Hanson authored
* Replace *.github.com urls with *.github.io * Fix two additional URL's having *.github.com
-
- Feb 25, 2021
-
-
Arthur O'Dwyer authored
-
- Feb 23, 2021
-
-
Arthur O'Dwyer authored
The SVG button's image had never been updated to display the actual master-branch build status! Now it's fixed. Also, use https:// URLs.
-
Arthur O'Dwyer authored
Thanks to Olaf Bergmann for the patch!
-
Arthur O'Dwyer authored
The spacing in `#define FOO(x,y,z)` is our idiosyncratic uthash style, and I actually think it looks better in this case anyway.
-
Moritz Warning authored
-
Moritz Warning authored
-
- Jan 06, 2021
-
-
Arthur O'Dwyer authored
-
- Jan 02, 2021
-
-
Arthur O'Dwyer authored
This completes the removal of uthash_memcmp, and the "feature parity" of HASH_KEYCMP with HASH_FUNCTION. The mental model, again, is: We default to hashing bytes with HASH_JEN, and we default to comparing bytes with `memcmp` out of <string.h>. But the user-programmer can override either or both of these defaults by compiling with `-DHASH_FUNCTION=...` and/or `-DHASH_KEYCMP=...`.
-
Arthur O'Dwyer authored
The behavior of these two "supported" codepaths has not changed at all: #define HASH_FUNCTION foo #include <uthash.h> HASH_VALUE(...) // expanded to foo(...) #include <uthash.h> HASH_VALUE(...) // expanded to HASH_JEN(...) However, some pathological codepaths have changed. The old behavior was that if you had defined `HASH_FUNCTION` before including "uthash.h", then when you called `HASH_VALUE` it would expand to `HASH_FCN` which would expand to `HASH_FUNCTION`. But if you hadn't defined `HASH_FUNCTION` before including "uthash.h", then when you called `HASH_VALUE` it would expand to `HASH_FCN` which would expand to `HASH_JEN`. #define HASH_FUNCTION foo #include <uthash.h> #undef HASH_FUNCTION #define HASH_FUNCTION bar HASH_VALUE(...) // expanded to bar(...) #include <uthash.h> #undef HASH_FUNCTION // unneeded, HASH_FUNCTION is undefined #define HASH_FUNCTION bar HASH_VALUE(...) // expanded to HASH_JEN(...) The new behavior is that `HASH_VALUE` expands to `HASH_FUNCTION`; and separately, if you don't define `HASH_FUNCTION` before including "uthash.h", we'll default it to `HASH_JEN`. #define HASH_FUNCTION foo #include <uthash.h> #undef HASH_FUNCTION #define HASH_FUNCTION bar HASH_VALUE(...) // expanded to bar(...) #include <uthash.h> #undef HASH_FUNCTION // needed, HASH_FUNCTION is defined to HASH_JEN #define HASH_FUNCTION bar HASH_VALUE(...) // expanded to bar(...) This is the way `HASH_KEYCMP` (formerly known as `uthash_memcmp`) has always worked. Since these two customization points are used in similar ways, it'll be nice to have their codepaths work alike instead of subtly different. Also, this gets rid of one level of macro indirection (`HASH_FCN` no longer exists), hooray! -
Arthur O'Dwyer authored
-
Arthur O'Dwyer authored
-
- Dec 18, 2020
-
-
Arthur O'Dwyer authored
-
- Dec 09, 2020
-
-
Arthur O'Dwyer authored
It was reported in #195 that Visual Studio 2019, on a 32-bit platform, produces this warning: Warning C26451 Arithmetic overflow: Using operator '*' on a 4 byte value and then casting the result to a 8 byte value. Cast the value to the wider type before calling operator '*' to avoid overflow (io.2). I'm not 100% sure that this tweak will silence the warning, but I think it might, and at least it's harmless. Fixes #195. -
Arthur O'Dwyer authored
See 762026ce and b1d8ab07 for previous attempts (circa 2014-2015) to detect whether it's OK to use <stdint.h>; and see #211 for how that logic is still incomplete. Rather than continue down this path, how about we just say that your system should either be C99 (it's the year 2020!), or you should provide your own "polyfill" version of <stdint.h> in the normal search path, or you should `-DHASH_NO_STDINT` and figure out the details yourself (e.g. by providing the necessary typedefs above where you `#include <uthash.h>`). Also support `-DHASH_DEFINE_OWN_STDINT` for this next release, so that there's an easy backward-compatibility mode. I plan to rip out that mode in the release after next, though.
-
- Dec 04, 2020
-
-
Arthur O'Dwyer authored
Well, this certainly fell by the wayside! Back in December 2018 (two years ago), I did the first part (introducing `HASH_KEYCMP`), cut release version 2.1.0, and said we should immediately fix up the tests and then let it bake for "a few months" before removing all support for `alt_memcmp`. It turns out that I forgot to do any of that. So now I've fixed up the tests, just in time to cut release version 2.2.0. Then we can let version 2.2.0 bake for "a few months" (read: maybe a couple of years :)) before finally removing `alt_memcmp`. test96.c now demonstrates the intended usage of HASH_FUNCTION and HASH_KEYCMP as a matching pair. (This is similar to the pair of template parameters `Hasher, KeyEqual` taken by C++'s `unordered_set`; the difference is that we take `KeyNotEqual`, so that you can pass in a strcmp-like trivalued comparator -- but you don't have to, and test96.c regression-tests that passing in a plain old not-equal function works fine. Fixes #157.
-
- Dec 03, 2020
-
-
Arthur O'Dwyer authored
-
- Dec 02, 2020
-
-
Arthur O'Dwyer authored
Fixes #190.
-
Kaloyan Petrov authored
-
Olaf Bergmann authored
The macro HASH_ADD_KEYPTR_BYHASHVALUE casts keyptr to (char *) hence violating const keys. As the key is used read-only, the UT_hash_handle structure can be changed to const void *key, allowing the cast to (const void *) instead. This fixes compiler warnings emitted when -Wcast-qual is specified.
-
Olaf Bergmann authored
Make local variable const * to preserve the constness of the passed argument src. This fixes compiler warnings from -Wcast-qual.
-
- May 13, 2020
-
-
Arthur O'Dwyer authored
"Make clean" between calls to "make". Run tests also on OSX (using Clang).
-
- May 01, 2020
-
-
Troy D. Hanson authored
Set up TravisCI for continuous testing
-
- Apr 29, 2020
-
-
Olaf Bergmann authored
When compiled with -Wextra, a warning concerning the comparison of integers with different signs is caused in function TrivialHash. Changing the type of the index variable i to size_t fixes this.
-
Arthur O'Dwyer authored
Thanks to @obgm for the patch!
-
Arthur O'Dwyer authored
I'm vaguely aware that some embedded compilers insist on the argc/argv signature (libc++'s unit tests mandate it, for example). But in this repo we've already got a mix of `int main()` and `int main(int, char**)`, so clearly nobody's complaining about `int main()` yet. Thanks to @obgm for the patch!
-