[Mesa-dev] [PATCH 1/5] util/sha1: add non-typedef name for the SHA1_CTX struct

Emil Velikov emil.l.velikov at gmail.com
Fri Feb 24 17:30:14 UTC 2017


Humble ping anyone ?

-Emil

On 24 January 2017 at 21:21, Emil Velikov <emil.l.velikov at gmail.com> wrote:
> From: Emil Velikov <emil.velikov at collabora.com>
>
> Using typedef(s) is not always the answer and makes it harder for people
> to do clever (or one might call nasty) things with the code.
>
> Add a struct name which we will use with follow-up commit.
>
> Signed-off-by: Emil Velikov <emil.velikov at collabora.com>
> ---
>  src/util/sha1/README | 3 +++
>  src/util/sha1/sha1.h | 2 +-
>  2 files changed, 4 insertions(+), 1 deletion(-)
>
> diff --git a/src/util/sha1/README b/src/util/sha1/README
> index f13baf9d1a..f30acf984e 100644
> --- a/src/util/sha1/README
> +++ b/src/util/sha1/README
> @@ -57,3 +57,6 @@ Upstream status: TBD (N/A ?)
>   - Manually expand __BEGIN_DECLS/__END_DECLS and make sure that they include
>  the struct declaration.
>  Upstream status: TBD
> +
> + - Add non-typedef struct name.
> +Upstream status: TBD
> diff --git a/src/util/sha1/sha1.h b/src/util/sha1/sha1.h
> index 243481a98e..029a0ae87f 100644
> --- a/src/util/sha1/sha1.h
> +++ b/src/util/sha1/sha1.h
> @@ -20,7 +20,7 @@
>  extern "C" {
>  #endif
>
> -typedef struct {
> +typedef struct _SHA1_CTX {
>      uint32_t state[5];
>      uint64_t count;
>      uint8_t buffer[SHA1_BLOCK_LENGTH];
> --
> 2.11.0
>


More information about the mesa-dev mailing list