X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Futil%2Fmesa-sha1.h;h=bde50ba1eb4f5c97528d13314318178a5282d620;hb=ded6ea92098a8393db554c3f0f08ec90720ddcf4;hp=ecbc708b5ea5c81266eb4e9ae2e266f334b988da;hpb=0fd61fb639f7704c4faa8c7fd262af32b3a1a01b;p=mesa.git diff --git a/src/util/mesa-sha1.h b/src/util/mesa-sha1.h index ecbc708b5ea..bde50ba1eb4 100644 --- a/src/util/mesa-sha1.h +++ b/src/util/mesa-sha1.h @@ -20,10 +20,11 @@ * DEALINGS IN THE SOFTWARE. */ -#ifndef SHA1_H -#define SHA1_H +#ifndef MESA_SHA1_H +#define MESA_SHA1_H #include +#include "c99_compat.h" #include "sha1/sha1.h" #ifdef __cplusplus @@ -32,10 +33,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])