summaryrefslogtreecommitdiff
path: root/src/pack-objects.h
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@github.com>2016-07-15 17:18:39 -0400
committerEdward Thomson <ethomson@github.com>2016-07-24 15:49:19 -0400
commit60e15ecd5518f26fa2d18cca9ab22b248596e68c (patch)
treeafba770a24818de0e30a1b113e0bbb88d26c6ba4 /src/pack-objects.h
parent581a4d3942ae5a66933632530fccd65f93ac5e4b (diff)
downloadlibgit2-60e15ecd5518f26fa2d18cca9ab22b248596e68c.tar.gz
packbuilder: `size_t` all the things
After 1cd65991, we were passing a pointer to an `unsigned long` to a function that now expected a pointer to a `size_t`. These types differ on 64-bit Windows, which means that we trash the stack. Use `size_t`s in the packbuilder to avoid this.
Diffstat (limited to 'src/pack-objects.h')
-rw-r--r--src/pack-objects.h25
1 files changed, 13 insertions, 12 deletions
diff --git a/src/pack-objects.h b/src/pack-objects.h
index 82dea81f5..5a84f4158 100644
--- a/src/pack-objects.h
+++ b/src/pack-objects.h
@@ -42,8 +42,8 @@ typedef struct git_pobject {
* me */
void *delta_data;
- unsigned long delta_size;
- unsigned long z_delta_size;
+ size_t delta_size;
+ size_t z_delta_size;
int written:1,
recursing:1,
@@ -65,10 +65,11 @@ struct git_packbuilder {
git_zstream zstream;
uint32_t nr_objects,
- nr_deltified,
- nr_alloc,
- nr_written,
- nr_remaining;
+ nr_deltified,
+ nr_written,
+ nr_remaining;
+
+ size_t nr_alloc;
git_pobject *object_list;
@@ -85,13 +86,13 @@ struct git_packbuilder {
git_cond progress_cond;
/* configs */
- uint64_t delta_cache_size;
- uint64_t max_delta_cache_size;
- uint64_t cache_max_small_delta_size;
- uint64_t big_file_threshold;
- uint64_t window_memory_limit;
+ size_t delta_cache_size;
+ size_t max_delta_cache_size;
+ size_t cache_max_small_delta_size;
+ size_t big_file_threshold;
+ size_t window_memory_limit;
- int nr_threads; /* nr of threads to use */
+ unsigned int nr_threads; /* nr of threads to use */
git_packbuilder_progress progress_cb;
void *progress_cb_payload;