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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by: Pavel Hrdina <phrdina@xxxxxxxxxx>
---
 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

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]

  Powered by Linux