[Spice-devel] [PATCH spice-common] codegen: Add some comments
Lukáš Hrázký
lhrazky at redhat.com
Wed May 9 08:26:11 UTC 2018
On Sun, 2018-05-06 at 13:33 +0100, Frediano Ziglio wrote:
> Signed-off-by: Frediano Ziglio <fziglio at redhat.com>
> ---
> python_modules/ptypes.py | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/python_modules/ptypes.py b/python_modules/ptypes.py
> index 209c00e..9007a3b 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, apply to pointers which by
> + # default are not marshalled (submarshaller are generated)
Either "submarshaller is generated" or "submarshallers are generated"
:)
> 'marshall',
> # this pointer member cannot be null
> 'nonnull',
> @@ -96,7 +98,7 @@ valid_attributes=set([
> # this channel is contained in an #ifdef section
> # the argument specifies the preprocessor define to check
> 'ifdef',
> - # write this member as zero on network
> + # write this member as zero on network, reading is just discarded ignoring it
The addition to the comment doesn't make sense to me, what do you mean
by it? That it's ignored when reading?
> 'zero',
> # specify minor version required for these members
> 'minor',
> @@ -124,7 +126,7 @@ attributes_with_arguments=set([
> def fix_attributes(attribute_list):
> attrs = {}
> for attr in attribute_list:
> - name = attr[0][1:]
> + name = attr[0][1:] # strip '@'
> lst = attr[1:]
> if not name in valid_attributes:
> raise Exception("Attribute %s not recognized" % name)
More information about the Spice-devel
mailing list