- 20 Mar, 2017 1 commit
-
-
The `map_free` functions were not implemented as functions but instead as macros which also set the map to NULL. While this is most certainly sensible in most cases, we should prefer the more obvious behavior, namingly leaving the map pointer intact. Furthermore, this macro has been refactored incorrectly during the map-refactorings: the two statements are not actually grouped together by a `do { ... } while (0)` block, as it is required for macros to match the behavior of functions more closely. This has led to at least one subtle nesting error in `pack-objects.c`. The following code block ``` if (pb->object_ix) git_oidmap_free(pb->object_ix); ``` would be expanded to ``` if (pb->object_ix) git_oidmap__free(pb->object_ix); pb->object_ix = NULL; ``` which is not what one woudl expect. While it is not a bug here as it would simply become a no-op, the wrong implementation could lead to bugs in other occasions. Fix this by simply removing the macro altogether and replacing it with real function calls. This leaves the burden of setting the pointer to NULL afterwards to the caller, but this is actually expected and behaves like other `free` functions.
Patrick Steinhardt committed
-
- 17 Feb, 2017 6 commits
-
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
Patrick Steinhardt committed
-
- 15 Feb, 2015 1 commit
-
-
Without this change, compiling with gcc and pedantic generates warning: ISO C does not allow extra ‘;’ outside of a function.
Stefan Widgren committed
-
- 13 Feb, 2015 1 commit
-
-
https://github.com/attractivechaos/klib/pull/42/files introduces `kreallocarray`. Hook that up as our `git__reallocarray`.
Edward Thomson committed
-
- 17 Apr, 2014 1 commit
-
-
This adds a basic test of doing simultaneous diffs on multiple threads and adds basic locking for the attr file cache because that was the immediate problem that arose from these tests.
Russell Belfer committed
-
- 12 Aug, 2013 1 commit
-
-
Carlos Martín Nieto committed
-
- 08 Aug, 2013 1 commit
-
-
This step is needed to easily add iterators to git_config_backend As well use these new git_strmap functions to implement foreach * git_strmap_iter * git_strmap_has_data(...) * git_strmap_begin(...) * git_strmap_end(...) * git_strmap_next(...)
Nico von Geyso committed
-
- 08 Jan, 2013 1 commit
-
-
Edward Thomson committed
-
- 12 Jul, 2012 1 commit
-
-
Russell Belfer committed
-
- 04 May, 2012 1 commit
-
-
Russell Belfer committed
-
- 25 Apr, 2012 1 commit
-
-
This renamed `git_khash_str` to `git_strmap`, `git_hash_oid` to `git_oidmap`, and deletes `git_hashtable` from the tree, plus adds unit tests for `git_strmap`.
Russell Belfer committed
-