Re: [Spice-devel] [PATCH spice-common 7/7] codegen: Fix c_type result for TypeAlias
> On Mon, Feb 18, 2019 at 04:01:29PM +, Frediano Ziglio wrote: > > c_type() method is supposed to return the type to use for > > C structure field. But the name is not a C type but a > > protocol name. > > Return the type name of the aliased type (for instance > > uint32_t for a uint32 type). > > This does not change the generated code. > > So this means this is unused I guess? Yes, currently is not used. I hope soon will be used :-) > Acked-by: Christophe Fergeau > > > > > > Signed-off-by: Frediano Ziglio > > --- > > python_modules/ptypes.py | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py > > index bc8762f..06a960b 100644 > > --- a/python_modules/ptypes.py > > +++ b/python_modules/ptypes.py > > @@ -253,7 +253,7 @@ class TypeAlias(Type): > > def c_type(self): > > if self.has_attr("ctype"): > > return self.attributes["ctype"][0] > > -return self.name > > +return self.the_type.c_type() > > > > class EnumBaseType(Type): > > def is_enum(self): ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel
Re: [Spice-devel] [PATCH spice-common 7/7] codegen: Fix c_type result for TypeAlias
On Mon, Feb 18, 2019 at 04:01:29PM +, Frediano Ziglio wrote: > c_type() method is supposed to return the type to use for > C structure field. But the name is not a C type but a > protocol name. > Return the type name of the aliased type (for instance > uint32_t for a uint32 type). > This does not change the generated code. So this means this is unused I guess? Acked-by: Christophe Fergeau > > Signed-off-by: Frediano Ziglio > --- > python_modules/ptypes.py | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py > index bc8762f..06a960b 100644 > --- a/python_modules/ptypes.py > +++ b/python_modules/ptypes.py > @@ -253,7 +253,7 @@ class TypeAlias(Type): > def c_type(self): > if self.has_attr("ctype"): > return self.attributes["ctype"][0] > -return self.name > +return self.the_type.c_type() > > class EnumBaseType(Type): > def is_enum(self): > -- > 2.20.1 > > ___ > Spice-devel mailing list > Spice-devel@lists.freedesktop.org > https://lists.freedesktop.org/mailman/listinfo/spice-devel signature.asc Description: PGP signature ___ Spice-devel mailing list Spice-devel@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/spice-devel