summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a0cd87a)
raw | patch | inline | side by side (parent: a0cd87a)
author | Martin Koegler <mkoegler@auto.tuwien.ac.at> | |
Sun, 22 Apr 2007 16:43:58 +0000 (18:43 +0200) | ||
committer | Junio C Hamano <junkio@cox.net> | |
Tue, 24 Apr 2007 07:08:49 +0000 (00:08 -0700) |
Each object in struct object_array is extended with the mode.
If not specified, S_IFINVALID is used. An object with an mode value
can be added with add_object_array_with_mode.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
If not specified, S_IFINVALID is used. An object with an mode value
can be added with add_object_array_with_mode.
Signed-off-by: Martin Koegler <mkoegler@auto.tuwien.ac.at>
Signed-off-by: Junio C Hamano <junkio@cox.net>
object.c | patch | blob | history | |
object.h | patch | blob | history |
diff --git a/object.c b/object.c
index 7bd3fec55655584f9cf4aebc6a13de7b84a78af5..37d1363359eb54070ed4dc52b9e96d4ad9457db3 100644 (file)
--- a/object.c
+++ b/object.c
}
void add_object_array(struct object *obj, const char *name, struct object_array *array)
+{
+ add_object_array_with_mode(obj, name, array, S_IFINVALID);
+}
+
+void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode)
{
unsigned nr = array->nr;
unsigned alloc = array->alloc;
}
objects[nr].item = obj;
objects[nr].name = name;
+ objects[nr].mode = mode;
array->nr = ++nr;
}
diff --git a/object.h b/object.h
index 3e26a0e8b9f87526dc02841031e5544a2518c266..94f19eed86ceebcc85770a379faf7b1270d1fad4 100644 (file)
--- a/object.h
+++ b/object.h
struct object_array_entry {
struct object *item;
const char *name;
+ unsigned mode;
} *objects;
};
/* Object array handling .. */
void add_object_array(struct object *obj, const char *name, struct object_array *array);
+void add_object_array_with_mode(struct object *obj, const char *name, struct object_array *array, unsigned mode);
#endif /* OBJECT_H */