Thread (15 messages) flat view 15 messages, 2 authors, 2016-06-15
STALE3747d

Revision v4 of 3 in this series.

Revisions (3)
  1. v2 [diff vs current]
  2. v3 [diff vs current]
  3. v4 current

[PATCH v4 08/12] object: introduce get_object_hash macro.

From: brian m. carlson <hidden>
Date: 2016-06-15 23:07:13
Subsystem: the rest · Maintainer: Linus Torvalds

This macro is a temporary change to ease the transition of struct object
to use struct object_id.  It takes an argument of struct object and
returns the object's hash.  Provide this hash next to struct object for
easier conversion.

Signed-off-by: brian m. carlson <redacted>
---
 object.h | 2 ++
 1 file changed, 2 insertions(+)
diff --git a/object.h b/object.h
index 6416247d..7c098d03 100644
--- a/object.h
+++ b/object.h
@@ -52,6 +52,8 @@ struct object {
 	unsigned char sha1[20];
 };
 
+#define get_object_hash(x) ((x).sha1)
+
 extern const char *typename(unsigned int type);
 extern int type_from_string_gently(const char *str, ssize_t, int gentle);
 #define type_from_string(str) type_from_string_gently(str, -1, 0)
-- 
2.6.2.409.gb049f0a
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help