提交 3c427010 编写于 作者: B brian m. carlson 提交者: Jeff King

object: introduce get_object_hash macro.

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: Nbrian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: NJeff King <peff@peff.net>
上级 6f3d57b6
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册