qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 3/4] crypto: use QOM macros for declaration/definition of sec


From: Eduardo Habkost
Subject: Re: [PATCH 3/4] crypto: use QOM macros for declaration/definition of secret types
Date: Thu, 23 Jul 2020 14:50:06 -0400

On Thu, Jul 23, 2020 at 07:14:09PM +0100, Daniel P. Berrangé wrote:
> This introduces the use of the OBJECT_DEFINE and OBJECT_DECLARE macro
> families in the secret types, in order to eliminate boilerplate code.
> 
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
> ---
>  crypto/secret.c                 | 24 ++++--------------------
>  crypto/secret_common.c          | 32 +++++++++-----------------------
>  crypto/secret_keyring.c         | 28 +++++++++-------------------
>  include/crypto/secret.h         | 11 ++---------
>  include/crypto/secret_common.h  | 13 ++-----------
>  include/crypto/secret_keyring.h | 18 ++----------------
>  6 files changed, 28 insertions(+), 98 deletions(-)
> 

Beautiful.

I wonder how hard it would be to automate this.  I'm assuming
Coccinelle won't be able to deal with the macro definitions, but
a handwritten conversion script would be really useful for
dealing with our 1226 static TypeInfo structs.

-- 
Eduardo




reply via email to

[Prev in Thread] Current Thread [Next in Thread]