summaryrefslogtreecommitdiff
path: root/csum-file.h
diff options
context:
space:
mode:
authorJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:41 -0800
committerJunio C Hamano <gitster@pobox.com>2014-12-12 14:31:42 -0800
commit3889e7a60c65031f0c5381d8060cefb4294d932e (patch)
treef63aa1e6a391e3fede0821e003b257ddfc721a2c /csum-file.h
parent23c0956441a101b2e8eca7e063e71bdc69a0c415 (diff)
parentb5007211b6582fc38647ff695b5ac51541ea9de8 (diff)
downloadgit-3889e7a60c65031f0c5381d8060cefb4294d932e.tar.gz
Merge branch 'jk/pack-bitmap'
* jk/pack-bitmap: pack-bitmap: do not use gcc packed attribute
Diffstat (limited to 'csum-file.h')
-rw-r--r--csum-file.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/csum-file.h b/csum-file.h
index bb543d52f1..7530927d77 100644
--- a/csum-file.h
+++ b/csum-file.h
@@ -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