summaryrefslogtreecommitdiff
path: root/object.h
diff options
context:
space:
mode:
authorPetr Baudis <pasky@ucw.cz>2005-05-10 22:58:16 (GMT)
committerPetr Baudis <xpasky@machine.sinus.cz>2005-05-10 22:58:16 (GMT)
commit883550481f885ab2865ab71819167230d21d4c14 (patch)
tree4552762e553e923bd013858b23a55ef125fdb501 /object.h
parent92747a907cba83938def6e7eb3ee1b4d3d9e609f (diff)
downloadgit-883550481f885ab2865ab71819167230d21d4c14.zip
git-883550481f885ab2865ab71819167230d21d4c14.tar.gz
git-883550481f885ab2865ab71819167230d21d4c14.tar.bz2
Mark the variable declarations in .h files as extern
This allows git to be built even with linkers which are not smart enough to join those symbols, and makes this correct C. Pointed out by several people.
Diffstat (limited to 'object.h')
-rw-r--r--object.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/object.h b/object.h
index d53a35a..09700d3 100644
--- a/object.h
+++ b/object.h
@@ -15,8 +15,8 @@ struct object {
struct object_list *refs;
};
-int nr_objs;
-struct object **objs;
+extern int nr_objs;
+extern struct object **objs;
struct object *lookup_object(unsigned char *sha1);