[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/6] scripts/qapi: rename 'special_features' to 'features'
|
From: |
Markus Armbruster |
|
Subject: |
Re: [PATCH 2/6] scripts/qapi: rename 'special_features' to 'features' |
|
Date: |
Mon, 05 Aug 2024 13:59:52 +0200 |
|
User-agent: |
Gnus/5.13 (Gnus v5.13) |
Daniel P. Berrangé <berrange@redhat.com> writes:
> This updates the QAPI code generation to refer to 'features' instead
> of 'special_features', in preparation for generalizing their exposure.
>
> Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Have you considered squashing this into the previous patch?
[...]
> diff --git a/scripts/qapi/gen.py b/scripts/qapi/gen.py
> index 6a8abe0041..e6c80cce23 100644
> --- a/scripts/qapi/gen.py
> +++ b/scripts/qapi/gen.py
> @@ -40,10 +40,10 @@
> from .source import QAPISourceInfo
>
>
> -def gen_special_features(features: Sequence[QAPISchemaFeature]) -> str:
> - special_features = [f"1u << QAPI_{feat.name.upper()}"
> - for feat in features if feat.is_special()]
> - return ' | '.join(special_features) or '0'
> +def gen_features(features: Sequence[QAPISchemaFeature]) -> str:
> + features = [f"1u << QAPI_{feat.name.upper()}"
> + for feat in features if feat.is_special()]
> + return ' | '.join(features) or '0'
This generates a bitwise or of unsigned operands. Shouldn't we change
the operands to uint64_t?
>
>
> class QAPIGen:
[...]
- [PATCH 0/6] qapi: generalize special features, Daniel P . Berrangé, 2024/08/01
- [PATCH 1/6] qapi: change 'unsigned special_features' to 'uint64_t features', Daniel P . Berrangé, 2024/08/01
- [PATCH 2/6] scripts/qapi: rename 'special_features' to 'features', Daniel P . Berrangé, 2024/08/01
- Re: [PATCH 2/6] scripts/qapi: rename 'special_features' to 'features',
Markus Armbruster <=
- [PATCH 3/6] qapi: use "QAPI_FEATURE" as namespace for features, Daniel P . Berrangé, 2024/08/01
- [PATCH 4/6] qapi: cope with feature names containing a '-', Daniel P . Berrangé, 2024/08/01
- [PATCH 5/6] qapi: apply schema prefix to QAPI feature enum constants, Daniel P . Berrangé, 2024/08/01