summaryrefslogtreecommitdiffstats
path: root/src/util/mesa-sha1.h
diff options
context:
space:
mode:
authorGrazvydas Ignotas <[email protected]>2017-03-22 01:43:34 +0200
committerEmil Velikov <[email protected]>2017-03-22 11:33:51 +0000
commit10d3702a3647842e66433d8b51557cba8b01e7e1 (patch)
treea943c233a85d5dd06824d0fa566e95a9213400fe /src/util/mesa-sha1.h
parent64b9a37c3ba61e5822ef84d455422a1dea8fbf39 (diff)
util/sha1: harmonize _mesa_sha1_* wrappers
Rather than using 3 different ways to wrap _mesa_sha1_*() to SHA1*() functions (a macro, prototype with implementation in .c and an inline function), make all 3 inline functions. Signed-off-by: Grazvydas Ignotas <[email protected]> Reviewed-by: Nicolai Hähnle <[email protected]> Reviewed-by: Emil Velikov <[email protected]>
Diffstat (limited to 'src/util/mesa-sha1.h')
-rw-r--r--src/util/mesa-sha1.h13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h
index ecbc708b5ea..a81aba96e94 100644
--- a/src/util/mesa-sha1.h
+++ b/src/util/mesa-sha1.h
@@ -32,10 +32,17 @@ extern "C" {
#define mesa_sha1 _SHA1_CTX
-#define _mesa_sha1_init SHA1Init
+static inline void
+_mesa_sha1_init(struct mesa_sha1 *ctx)
+{
+ SHA1Init(ctx);
+}
-void
-_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, int size);
+static inline void
+_mesa_sha1_update(struct mesa_sha1 *ctx, const void *data, size_t size)
+{
+ SHA1Update(ctx, (const unsigned char *)data, size);
+}
static inline void
_mesa_sha1_final(struct mesa_sha1 *ctx, unsigned char result[20])