summaryrefslogtreecommitdiffstats
path: root/libvirt-override.c
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2013-10-07 13:18:56 -0600
committerEric Blake <eblake@redhat.com>2013-10-14 14:34:37 -0600
commit90461df0cad131abf2abb8924360bab9dbc7f54b (patch)
tree5d706a6f3650c2d290cc2fbfdaaed7d5f49883b2 /libvirt-override.c
parentbc116872291690bc18e475d51a65748122ddec44 (diff)
downloadlibvirt-python-v9-90461df0cad131abf2abb8924360bab9dbc7f54b.tar.gz
libvirt-python-v9-90461df0cad131abf2abb8924360bab9dbc7f54b.tar.xz
libvirt-python-v9-90461df0cad131abf2abb8924360bab9dbc7f54b.zip
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>
Diffstat (limited to 'libvirt-override.c')
-rw-r--r--libvirt-override.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libvirt-override.c b/libvirt-override.c
index e659bae..4800d1d 100644
--- a/libvirt-override.c
+++ b/libvirt-override.c
@@ -73,7 +73,7 @@ static char *py_str(PyObject *obj)
* Python dictionary for return to the user. Return NULL on failure,
* after raising a python exception. */
static PyObject *
-getPyVirTypedParameter(const virTypedParameterPtr params, int nparams)
+getPyVirTypedParameter(const virTypedParameter *params, int nparams)
{
PyObject *key, *val, *info;
size_t i;
@@ -149,7 +149,7 @@ cleanup:
* raising a python exception. */
static virTypedParameterPtr ATTRIBUTE_NONNULL(1) ATTRIBUTE_NONNULL(2)
setPyVirTypedParameter(PyObject *info,
- const virTypedParameterPtr params, int nparams)
+ const virTypedParameter *params, int nparams)
{
PyObject *key, *value;
#if PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION <= 4