]> xenbits.xensource.com Git - libvirt.git/commit
maint: avoid 'const fooPtr' in python bindings
authorEric Blake <eblake@redhat.com>
Mon, 7 Oct 2013 19:18:56 +0000 (13:18 -0600)
committerEric Blake <eblake@redhat.com>
Mon, 14 Oct 2013 20:34:37 +0000 (14:34 -0600)
commitd3f9d8510bbc4e158f2755b4fab54619edd6e2a4
tree6e47975b8e2e593bc6c12ae0094d02b6c0b1905b
parentb8984770dcfeb0e7041c5a89d498f8e4a66258cd
maint: avoid 'const fooPtr' in python bindings

'const fooPtr' is the same as 'foo * const' (the pointer won't
change, but it's contents can).  But in general, if an interface
is trying to be const-correct, it should be using 'const foo *'
(the pointer is to data that can't be changed).

Fix up offenders in the python bindings.

* python/generator.py (py_types): Drop useless conversions.
* python/libvirt-override.c (getPyVirTypedParameter)
(setPyVirTypedParameter): Use intended type.

Signed-off-by: Eric Blake <eblake@redhat.com>
python/generator.py
python/libvirt-override.c