[libvirt] [python PATCH 1/4] libvirt-utils: remove unused py_str function

Pavel Hrdina phrdina at redhat.com
Tue Jun 12 05:16:38 UTC 2018


Commit <57a160b5248ba47d4e1c9d22d95847dad8e0524f> removed last usage
but did not remove the function itself.

Signed-off-by: Pavel Hrdina <phrdina at redhat.com>
---
 libvirt-utils.c | 14 --------------
 libvirt-utils.h |  1 -
 2 files changed, 15 deletions(-)

diff --git a/libvirt-utils.c b/libvirt-utils.c
index f7b4478..e17e794 100644
--- a/libvirt-utils.c
+++ b/libvirt-utils.c
@@ -199,20 +199,6 @@ virTypedParamsFree(virTypedParameterPtr params,
 }
 #endif /* ! LIBVIR_CHECK_VERSION(1, 0, 2) */
 
-char *
-py_str(PyObject *obj)
-{
-    PyObject *str = PyObject_Str(obj);
-    char *ret;
-    if (!str) {
-        PyErr_Print();
-        PyErr_Clear();
-        return NULL;
-    };
-    libvirt_charPtrUnwrap(str, &ret);
-    return ret;
-}
-
 /* Helper function to convert a virTypedParameter output array into a
  * Python dictionary for return to the user.  Return NULL on failure,
  * after raising a python exception.  */
diff --git a/libvirt-utils.h b/libvirt-utils.h
index 0af1e62..cc3d278 100644
--- a/libvirt-utils.h
+++ b/libvirt-utils.h
@@ -319,7 +319,6 @@ void virTypedParamsClear(virTypedParameterPtr params, int nparams);
 void virTypedParamsFree(virTypedParameterPtr params, int nparams);
 # endif /* ! LIBVIR_CHECK_VERSION(1, 0, 2) */
 
-char * py_str(PyObject *obj);
 PyObject * getPyVirTypedParameter(const virTypedParameter *params,
                                   int nparams);
 virTypedParameterPtr setPyVirTypedParameter(PyObject *info,
-- 
2.17.1




More information about the libvir-list mailing list