diff options
author | Junio C Hamano <junkio@cox.net> | 2007-04-01 18:14:06 -0700 |
---|---|---|
committer | Junio C Hamano <junkio@cox.net> | 2007-04-22 22:53:54 -0700 |
commit | 228e94f93570b580da388069900c56b813c91953 (patch) | |
tree | 34bac44f8bb3f08b493c1d8e7d1634b456063d3d /read-cache.c | |
parent | 4280cde95fa4e3fb012eb6d0c239a7777baaf60c (diff) | |
download | git-228e94f93570b580da388069900c56b813c91953.tar.gz |
Move index-related variables into a structure.
This defines a index_state structure and moves index-related
global variables into it. Currently there is one instance of
it, the_index, and everybody accesses it, so there is no code
change.
Signed-off-by: Junio C Hamano <junkio@cox.net>
Diffstat (limited to 'read-cache.c')
-rw-r--r-- | read-cache.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/read-cache.c b/read-cache.c index d2f332a622..9b4385ea5c 100644 --- a/read-cache.c +++ b/read-cache.c @@ -19,14 +19,10 @@ #define CACHE_EXT(s) ( (s[0]<<24)|(s[1]<<16)|(s[2]<<8)|(s[3]) ) #define CACHE_EXT_TREE 0x54524545 /* "TREE" */ -struct cache_entry **active_cache; -static time_t index_file_timestamp; -unsigned int active_nr, active_alloc, active_cache_changed; - -struct cache_tree *active_cache_tree; - -static void *cache_mmap; -static size_t cache_mmap_size; +struct index_state the_index; +#define index_file_timestamp (the_index.timestamp) +#define cache_mmap (the_index.mmap) +#define cache_mmap_size (the_index.mmap_size) /* * This only updates the "non-critical" parts of the directory |