]> xenbits.xensource.com Git - libvirt.git/commitdiff
python: drop unused function
authorEric Blake <eblake@redhat.com>
Wed, 8 Feb 2012 00:14:11 +0000 (17:14 -0700)
committerEric Blake <eblake@redhat.com>
Wed, 8 Feb 2012 00:14:11 +0000 (17:14 -0700)
Gcc warned about an unused static function.

* python/libvirt-qemu-override.c (py_str): Delete.

python/libvirt-qemu-override.c

index 485c80956773e2e579ce340399778c7ccbcc8de8..c220af184962518dd6053b617f7c0aad9674be61 100644 (file)
@@ -4,7 +4,7 @@
  *           entry points where an automatically generated stub is
  *           unpractical
  *
- * Copyright (C) 2011 Red Hat, Inc.
+ * Copyright (C) 2011-2012 Red Hat, Inc.
  *
  * Daniel Veillard <veillard@redhat.com>
  */
@@ -47,20 +47,6 @@ extern void initcygvirtmod_qemu(void);
 #define VIR_PY_INT_FAIL (libvirt_intWrap(-1))
 #define VIR_PY_INT_SUCCESS (libvirt_intWrap(0))
 
-/* We don't want to free() returned value. As written in doc:
- * PyString_AsString returns pointer to 'internal buffer of string,
- * not a copy' and 'It must not be deallocated'. */
-static char *py_str(PyObject *obj)
-{
-    PyObject *str = PyObject_Str(obj);
-    if (!str) {
-        PyErr_Print();
-        PyErr_Clear();
-        return NULL;
-    };
-    return PyString_AsString(str);
-}
-
 /************************************************************************
  *                                                                     *
  *             Statistics                                              *