WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Misc fixes for breakage when moving to new Python/C inte

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Misc fixes for breakage when moving to new Python/C interface style.
From: Xen patchbot -unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 21 Nov 2005 22:48:12 +0000
Delivery-date: Mon, 21 Nov 2005 22:49:14 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID f546d8697b0e614d05e2505d10ffb2542c16f3b8
# Parent  11a06dd44a8d5fd8aa503adf8120329085741b07
Misc fixes for breakage when moving to new Python/C interface style.

Signed-off-by: Ewan Mellor <ewan@xxxxxxxxxxxxx>

diff -r 11a06dd44a8d -r f546d8697b0e tools/python/xen/lowlevel/xc/xc.c
--- a/tools/python/xen/lowlevel/xc/xc.c Mon Nov 21 17:47:31 2005
+++ b/tools/python/xen/lowlevel/xc/xc.c Mon Nov 21 18:08:27 2005
@@ -1061,14 +1061,14 @@
     return Py_FindMethod(pyxc_methods, obj, name);
 }
 
-static PyObject *PyXc_new(PyTypeObject *type, PyObject *args)
+static PyObject *PyXc_new(PyTypeObject *type, PyObject *args, PyObject *kwds)
 {
     XcObject *self = (XcObject *)type->tp_alloc(type, 0);
 
     if (self == NULL)
         return NULL;
 
-    self->xc_handle = NULL;
+    self->xc_handle = -1;
 
     return (PyObject *)self;
 }
@@ -1086,9 +1086,9 @@
 
 static void PyXc_dealloc(XcObject *self)
 {
-    if (self->xc_handle) {
+    if (self->xc_handle != -1) {
         xc_interface_close(self->xc_handle);
-        self->xc_handle = NULL;
+        self->xc_handle = -1;
     }
 
     self->ob_type->tp_free((PyObject *)self);
@@ -1145,7 +1145,7 @@
     if (PyType_Ready(&PyXcType) < 0)
         return;
 
-    m = Py_InitModule(PKG, PyXc_methods);
+    m = Py_InitModule(PKG, xc_methods);
 
     if (m == NULL)
       return;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] Misc fixes for breakage when moving to new Python/C interface style., Xen patchbot -unstable <=