[Libguestfs] [PATCH nbdkit v2 05/10] python: Share common code in boolean callbacks.
Richard W.M. Jones
rjones at redhat.com
Sat Nov 23 09:43:21 UTC 2019
On Fri, Nov 22, 2019 at 03:46:56PM -0600, Eric Blake wrote:
> On 11/22/19 1:54 PM, Richard W.M. Jones wrote:
> >This change is pure refactoring and should have no effect.
> >---
> > plugins/python/nbdkit-python-plugin.pod | 12 ++--
> > plugins/python/python.c | 90 +++++--------------------
> > 2 files changed, 24 insertions(+), 78 deletions(-)
> >
> >diff --git a/plugins/python/nbdkit-python-plugin.pod b/plugins/python/nbdkit-python-plugin.pod
> >index 51e0f57..0fd4dcb 100644
> >--- a/plugins/python/nbdkit-python-plugin.pod
> >+++ b/plugins/python/nbdkit-python-plugin.pod
> >@@ -184,25 +184,25 @@ contents will be garbage collected.
> > def get_size(h):
> > # return the size of the disk
> >-=item C<can_write>
> >+=item C<is_rotational>
> > (Optional)
> >- def can_write(h):
> >+ def is_rotational(h):
> > # return a boolean
> >-=item C<can_flush>
> >+=item C<can_write>
> > (Optional)
> >- def can_flush(h):
> >+ def can_write(h):
> > # return a boolean
> >-=item C<is_rotational>
> >+=item C<can_flush>
> > (Optional)
> >- def is_rotational(h):
> >+ def can_flush(h):
> > # return a boolean
>
> Why the shuffle? To match ordering in other docs? But not the end
> of the world.
I was going to say because it matches the order of the C
documentation, but in fact it does not. We do really need to settle
on a single ordering across all documentation, but that's for another
day ...
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming and virtualization blog: http://rwmj.wordpress.com
virt-top is 'top' for virtual machines. Tiny program with many
powerful monitoring features, net stats, disk stats, logging, etc.
http://people.redhat.com/~rjones/virt-top
More information about the Libguestfs
mailing list