]> git.ipfire.org Git - thirdparty/git.git/blobdiff - csum-file.h
pack-bitmap: do not use gcc packed attribute
[thirdparty/git.git] / csum-file.h
index 9dedb038ea9c77a8fadac370e039f1672e948325..da612c59c1bccab839e0a91aa0f37ed292ce59a0 100644 (file)
@@ -39,4 +39,15 @@ extern void sha1flush(struct sha1file *f);
 extern void crc32_begin(struct sha1file *);
 extern uint32_t crc32_end(struct sha1file *);
 
+static inline void sha1write_u8(struct sha1file *f, uint8_t data)
+{
+       sha1write(f, &data, sizeof(data));
+}
+
+static inline void sha1write_be32(struct sha1file *f, uint32_t data)
+{
+       data = htonl(data);
+       sha1write(f, &data, sizeof(data));
+}
+
 #endif