提交 61e8450f 编写于 作者: D Daniel Veillard

* python/libvir.c: Pete Vetere pointed out a bug in string cast

  when handling errors in Python
Daniel
上级 ea30f6aa
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
......
......@@ -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 */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册