diff options
author | Daniel P. Berrange <berrange@redhat.com> | 2013-12-05 16:36:41 +0000 |
---|---|---|
committer | Daniel P. Berrange <berrange@redhat.com> | 2013-12-11 16:12:54 +0000 |
commit | aac76e7630f5899e221672ef63b46baa066e1b8e (patch) | |
tree | 206face22a8d308028217bf0ca3b4a94dbbbd1bf /typewrappers.h | |
parent | e5161dec9e3ad3d1738e1316fddd39f887298734 (diff) | |
download | libvirt-python-aac76e7630f5899e221672ef63b46baa066e1b8e.tar.gz |
override: Replace PyString_AsString with libvirt_charPtrUnwrap
Replace calls to PyString_AsString with the helper method
libvirt_charPtrUnwrap. This isolates the code that will
change in Python3.
In making this change, all callers now have responsibility
for free'ing the string.
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
Diffstat (limited to 'typewrappers.h')
-rw-r--r-- | typewrappers.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/typewrappers.h b/typewrappers.h index 04e364f..7068426 100644 --- a/typewrappers.h +++ b/typewrappers.h @@ -173,6 +173,7 @@ int libvirt_longlongUnwrap(PyObject *obj, long long *val); int libvirt_ulonglongUnwrap(PyObject *obj, unsigned long long *val); int libvirt_doubleUnwrap(PyObject *obj, double *val); int libvirt_boolUnwrap(PyObject *obj, bool *val); +int libvirt_charPtrUnwrap(PyObject *obj, char **str); PyObject * libvirt_virConnectPtrWrap(virConnectPtr node); PyObject * libvirt_virDomainPtrWrap(virDomainPtr node); PyObject * libvirt_virNetworkPtrWrap(virNetworkPtr node); |