Re: [PATCH 3/3] scripts/qapi: pull c_name and lstrip from camel_to_upper to caller

Philippe Mathieu-Daudé <[email protected]>
Newsgroups gmane.comp.emulators.qemu
Message-ID <[email protected]>
On 24/7/26 15:00, Paolo Bonzini wrote:
> Allow using camel_to_upper for other languages too.
> 
> In particular, the lstrip() is needed to avoid reserved C identifiers,
> for example:
> 
>      typedef enum __org_qemu_x_Enum {
>          __ORG_QEMU_X_ENUM___ORG_QEMU_X_VALUE,
>          __ORG_QEMU_X_ENUM__MAX,
>      } __org_qemu_x_Enum;
> 
> Insulate Rust from this, since underscores have a different meaning
> in Rust (though only for the sake of warnings).
> 
> Signed-off-by: Paolo Bonzini <[email protected]>
> ---
>   scripts/qapi/common.py | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)

Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.