]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
* python/libvir.c: Pete Vetere pointed out a bug in string cast
authorDaniel Veillard <veillard@redhat.com>
Tue, 29 Aug 2006 14:39:57 +0000 (14:39 +0000)
committerDaniel Veillard <veillard@redhat.com>
Tue, 29 Aug 2006 14:39:57 +0000 (14:39 +0000)
  when handling errors in Python
Daniel

ChangeLog
python/libvir.c

index f5c5af06a003a5892c058a67c6540789667d0c3c..844ff95ea7b458c3a022c62672e6b7d486c38794 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+Tue Aug 29 15:41:46 CEST 2006 Daniel Veillard <veillard@redhat.com>
+
+       * python/libvir.c: Pete Vetere pointed out a bug in string cast 
+         when handling errors in Python
+
 Sat Aug 26 16:36:15 CEST 2006 Daniel Veillard <veillard@redhat.com>
 
        * src/sexpr.c src/sexpr.h src/xend_internal.c src/xml.c: applied
index 17fb4a17d27ba0f4ad5ec24a556e6849c9046af7..907383b03f1640d48d8cb3b3f1eb7be67118b087 100644 (file)
@@ -51,11 +51,11 @@ libvirt_virErrorFuncHandler(ATTRIBUTE_UNUSED void *ctx, virErrorPtr err)
         Py_XINCREF(libvirt_virPythonErrorFuncCtxt);
         PyTuple_SetItem(info, 0, PyInt_FromLong((long) err->code));
         PyTuple_SetItem(info, 1, PyInt_FromLong((long) err->domain));
-       PyTuple_SetItem(info, 2, libvirt_charPtrWrap(err->message));
+       PyTuple_SetItem(info, 2, libvirt_constcharPtrWrap(err->message));
         PyTuple_SetItem(info, 3, PyInt_FromLong((long) err->level));
-       PyTuple_SetItem(info, 4, libvirt_charPtrWrap(err->str1));
-       PyTuple_SetItem(info, 5, libvirt_charPtrWrap(err->str2));
-       PyTuple_SetItem(info, 6, libvirt_charPtrWrap(err->str3));
+       PyTuple_SetItem(info, 4, libvirt_constcharPtrWrap(err->str1));
+       PyTuple_SetItem(info, 5, libvirt_constcharPtrWrap(err->str2));
+       PyTuple_SetItem(info, 6, libvirt_constcharPtrWrap(err->str3));
         PyTuple_SetItem(info, 7, PyInt_FromLong((long) err->int1));
         PyTuple_SetItem(info, 8, PyInt_FromLong((long) err->int2));
        /* TODO pass conn and dom if available */