Re: [PATCH spice-common v3] codegen: Add some comments

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

 



On Wed, 2018-05-09 at 11:49 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  python_modules/ptypes.py | 6 +++++-
>  1 file changed, 5 insertions(+), 1 deletion(-)
> 
> diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
> index 209c00e..0f6d8d6 100644
> --- a/python_modules/ptypes.py
> +++ b/python_modules/ptypes.py
> @@ -83,6 +83,8 @@ valid_attributes=set([
>      'nomarshal',
>      # ??? not used by python code
>      'zero_terminated',
> +    # force generating marshaller code, applies to pointers which by
> +    # default are not marshalled (submarshallers are generated)
>      'marshall',
>      # this pointer member cannot be null
>      'nonnull',
> @@ -97,6 +99,8 @@ valid_attributes=set([
>      # the argument specifies the preprocessor define to check
>      'ifdef',
>      # write this member as zero on network
> +    # when marshalling, a zero field is written to the network
> +    # when demarshalling, the field is read from the network and discarded
>      'zero',
>      # specify minor version required for these members
>      'minor',
> @@ -124,7 +128,7 @@ attributes_with_arguments=set([
>  def fix_attributes(attribute_list):
>      attrs = {}
>      for attr in attribute_list:
> -        name = attr[0][1:]
> +        name = attr[0][1:] # [1:] strips the leading '@' from the name
>          lst = attr[1:]
>          if not name in valid_attributes:
>              raise Exception("Attribute %s not recognized" % name)

Acked-by: Lukáš Hrázký <lhrazky@xxxxxxxxxx>
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/spice-devel




[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]