dcantrel pushed to pyparted (f21). "Add Python 3 subpackage (#1196402)"

notifications at fedoraproject.org notifications at fedoraproject.org
Fri Apr 24 19:06:03 UTC 2015


>From 18fef2b4f38cb9f0f536e91bb1ba409262116d4a Mon Sep 17 00:00:00 2001
From: David Cantrell <dcantrell at redhat.com>
Date: Fri, 24 Apr 2015 15:05:46 -0400
Subject: Add Python 3 subpackage (#1196402)


diff --git a/pyparted-3.9.5-rhbz1196402.patch b/pyparted-3.9.5-rhbz1196402.patch
index 48c5afd..2bed97b 100644
--- a/pyparted-3.9.5-rhbz1196402.patch
+++ b/pyparted-3.9.5-rhbz1196402.patch
@@ -1,3 +1,101 @@
+diff -up pyparted-3.9.5/include/pyconstraint.h.orig pyparted-3.9.5/include/pyconstraint.h
+--- pyparted-3.9.5/include/pyconstraint.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/pyconstraint.h	2015-04-24 15:01:00.385767442 -0400
+@@ -55,7 +55,6 @@ typedef struct {
+ } _ped_Constraint;
+ 
+ void _ped_Constraint_dealloc(_ped_Constraint *);
+-int _ped_Constraint_compare(_ped_Constraint *, PyObject *);
+ PyObject *_ped_Constraint_richcompare(_ped_Constraint *, PyObject *, int);
+ PyObject *_ped_Constraint_str(_ped_Constraint *);
+ int _ped_Constraint_traverse(_ped_Constraint *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pydevice.h.orig pyparted-3.9.5/include/pydevice.h
+--- pyparted-3.9.5/include/pydevice.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/pydevice.h	2015-04-24 15:03:54.071767442 -0400
+@@ -39,7 +39,6 @@ typedef struct {
+ } _ped_CHSGeometry;
+ 
+ void _ped_CHSGeometry_dealloc(_ped_CHSGeometry *);
+-int _ped_CHSGeometry_compare(_ped_CHSGeometry *, PyObject *);
+ PyObject *_ped_CHSGeometry_richcompare(_ped_CHSGeometry *, PyObject *, int);
+ PyObject *_ped_CHSGeometry_str(_ped_CHSGeometry *);
+ int _ped_CHSGeometry_traverse(_ped_CHSGeometry *, visitproc, void *);
+@@ -72,7 +71,6 @@ typedef struct {
+ } _ped_Device;
+ 
+ void _ped_Device_dealloc(_ped_Device *);
+-int _ped_Device_compare(_ped_Device *, PyObject *);
+ PyObject *_ped_Device_richcompare(_ped_Device *, PyObject *, int);
+ PyObject *_ped_Device_str(_ped_Device *);
+ int _ped_Device_traverse(_ped_Device *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pydisk.h.orig pyparted-3.9.5/include/pydisk.h
+--- pyparted-3.9.5/include/pydisk.h.orig	2015-04-24 14:46:46.311767442 -0400
++++ pyparted-3.9.5/include/pydisk.h	2015-04-24 15:04:05.623767442 -0400
+@@ -47,7 +47,6 @@ typedef struct {
+ } _ped_Partition;
+ 
+ void _ped_Partition_dealloc(_ped_Partition *);
+-int _ped_Partition_compare(_ped_Partition *, PyObject *);
+ PyObject *_ped_Partition_richcompare(_ped_Partition *, PyObject *, int);
+ PyObject *_ped_Partition_str(_ped_Partition *);
+ int _ped_Partition_traverse(_ped_Partition *, visitproc, void *);
+@@ -71,7 +70,6 @@ typedef struct {
+ } _ped_Disk;
+ 
+ void _ped_Disk_dealloc(_ped_Disk *);
+-int _ped_Disk_compare(_ped_Disk *, PyObject *);
+ PyObject *_ped_Disk_richcompare(_ped_Disk *, PyObject *, int);
+ PyObject *_ped_Disk_str(_ped_Disk *);
+ int _ped_Disk_traverse(_ped_Disk *, visitproc, void *);
+@@ -90,7 +88,6 @@ typedef struct {
+ } _ped_DiskType;
+ 
+ void _ped_DiskType_dealloc(_ped_DiskType *);
+-int _ped_DiskType_compare(_ped_DiskType *, PyObject *);
+ PyObject *_ped_DiskType_richcompare(_ped_DiskType *, PyObject *, int);
+ PyObject *_ped_DiskType_str(_ped_DiskType *);
+ int _ped_DiskType_traverse(_ped_DiskType *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pyfilesys.h.orig pyparted-3.9.5/include/pyfilesys.h
+--- pyparted-3.9.5/include/pyfilesys.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/pyfilesys.h	2015-04-24 15:04:12.455767442 -0400
+@@ -48,7 +48,6 @@ typedef struct {
+ } _ped_FileSystemType;
+ 
+ void _ped_FileSystemType_dealloc(_ped_FileSystemType *);
+-int _ped_FileSystemType_compare(_ped_FileSystemType *, PyObject *);
+ PyObject *_ped_FileSystemType_richcompare(_ped_FileSystemType *, PyObject *,
+                                           int);
+ PyObject *_ped_FileSystemType_str(_ped_FileSystemType *);
+@@ -72,7 +71,6 @@ typedef struct {
+ } _ped_FileSystem;
+ 
+ void _ped_FileSystem_dealloc(_ped_FileSystem *);
+-int _ped_FileSystem_compare(_ped_FileSystem *, PyObject *);
+ PyObject *_ped_FileSystem_richcompare(_ped_FileSystem *, PyObject *, int);
+ PyObject *_ped_FileSystem_str(_ped_FileSystem *);
+ int _ped_FileSystem_traverse(_ped_FileSystem *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pygeom.h.orig pyparted-3.9.5/include/pygeom.h
+--- pyparted-3.9.5/include/pygeom.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/pygeom.h	2015-04-24 15:04:17.463767442 -0400
+@@ -58,7 +58,6 @@ typedef struct {
+ } _ped_Geometry;
+ 
+ void _ped_Geometry_dealloc(_ped_Geometry *);
+-int _ped_Geometry_compare(_ped_Geometry *, PyObject *);
+ PyObject *_ped_Geometry_richcompare(_ped_Geometry *, PyObject *, int);
+ PyObject *_ped_Geometry_str(_ped_Geometry *);
+ int _ped_Geometry_traverse(_ped_Geometry *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pynatmath.h.orig pyparted-3.9.5/include/pynatmath.h
+--- pyparted-3.9.5/include/pynatmath.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/pynatmath.h	2015-04-24 15:04:21.471767442 -0400
+@@ -47,7 +47,6 @@ typedef struct {
+ } _ped_Alignment;
+ 
+ void _ped_Alignment_dealloc(_ped_Alignment *);
+-int _ped_Alignment_compare(_ped_Alignment *, PyObject *);
+ PyObject *_ped_Alignment_richcompare(_ped_Alignment *, PyObject *, int);
+ PyObject *_ped_Alignment_str(_ped_Alignment *);
+ int _ped_Alignment_traverse(_ped_Alignment *, visitproc, void *);
 diff -up pyparted-3.9.5/include/pytimer.h.orig pyparted-3.9.5/include/pytimer.h
 --- pyparted-3.9.5/include/pytimer.h.orig	2014-06-24 13:06:32.000000000 -0400
 +++ pyparted-3.9.5/include/pytimer.h	2015-04-24 14:47:07.086767442 -0400
@@ -9,6 +107,105 @@ diff -up pyparted-3.9.5/include/pytimer.h.orig pyparted-3.9.5/include/pytimer.h
  PyObject *_ped_Timer_richcompare(_ped_Timer *, PyObject *, int);
  PyObject *_ped_Timer_str(_ped_Timer *);
  int _ped_Timer_traverse(_ped_Timer *, visitproc, void *);
+diff -up pyparted-3.9.5/include/pyunit.h.orig pyparted-3.9.5/include/pyunit.h
+diff -up pyparted-3.9.5/include/typeobjects/pyconstraint.h.orig pyparted-3.9.5/include/typeobjects/pyconstraint.h
+--- pyparted-3.9.5/include/typeobjects/pyconstraint.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/typeobjects/pyconstraint.h	2015-04-24 15:00:47.089767442 -0400
+@@ -73,7 +73,6 @@ PyTypeObject _ped_Constraint_Type_obj =
+     .tp_dealloc = (destructor) _ped_Constraint_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Constraint_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+diff -up pyparted-3.9.5/include/typeobjects/pydevice.h.orig pyparted-3.9.5/include/typeobjects/pydevice.h
+--- pyparted-3.9.5/include/typeobjects/pydevice.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/typeobjects/pydevice.h	2015-04-24 15:05:02.927767442 -0400
+@@ -58,7 +58,6 @@ PyTypeObject _ped_CHSGeometry_Type_obj =
+     .tp_dealloc = (destructor) _ped_CHSGeometry_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_CHSGeometry_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+@@ -221,7 +220,6 @@ PyTypeObject _ped_Device_Type_obj = {
+     .tp_dealloc = (destructor) _ped_Device_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Device_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+diff -up pyparted-3.9.5/include/typeobjects/pydisk.h.orig pyparted-3.9.5/include/typeobjects/pydisk.h
+--- pyparted-3.9.5/include/typeobjects/pydisk.h.orig	2015-04-24 14:46:46.312767442 -0400
++++ pyparted-3.9.5/include/typeobjects/pydisk.h	2015-04-24 15:05:10.159767442 -0400
+@@ -81,7 +81,6 @@ PyTypeObject _ped_Partition_Type_obj = {
+     .tp_dealloc = (destructor) _ped_Partition_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Partition_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+@@ -221,7 +220,6 @@ PyTypeObject _ped_Disk_Type_obj = {
+     .tp_dealloc = (destructor) _ped_Disk_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Disk_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+@@ -286,7 +284,6 @@ PyTypeObject _ped_DiskType_Type_obj = {
+     .tp_dealloc = (destructor) _ped_DiskType_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_DiskType_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+diff -up pyparted-3.9.5/include/typeobjects/pyfilesys.h.orig pyparted-3.9.5/include/typeobjects/pyfilesys.h
+--- pyparted-3.9.5/include/typeobjects/pyfilesys.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/typeobjects/pyfilesys.h	2015-04-24 15:05:17.039767442 -0400
+@@ -51,7 +51,6 @@ PyTypeObject _ped_FileSystemType_Type_ob
+     .tp_dealloc = (destructor) _ped_FileSystemType_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_FileSystemType_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+@@ -106,7 +105,6 @@ PyTypeObject _ped_FileSystem_Type_obj =
+     .tp_dealloc = (destructor) _ped_FileSystem_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_FileSystemType_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+diff -up pyparted-3.9.5/include/typeobjects/pygeom.h.orig pyparted-3.9.5/include/typeobjects/pygeom.h
+--- pyparted-3.9.5/include/typeobjects/pygeom.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/typeobjects/pygeom.h	2015-04-24 15:05:21.399767442 -0400
+@@ -91,7 +91,6 @@ PyTypeObject _ped_Geometry_Type_obj = {
+     .tp_dealloc = (destructor) _ped_Geometry_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Geometry_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
+diff -up pyparted-3.9.5/include/typeobjects/pynatmath.h.orig pyparted-3.9.5/include/typeobjects/pynatmath.h
+--- pyparted-3.9.5/include/typeobjects/pynatmath.h.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/include/typeobjects/pynatmath.h	2015-04-24 15:05:25.518767442 -0400
+@@ -67,7 +67,6 @@ PyTypeObject _ped_Alignment_Type_obj = {
+     .tp_dealloc = (destructor) _ped_Alignment_dealloc,
+  /* .tp_getattr = XXX */
+  /* .tp_setattr = XXX */
+-    .tp_compare = (cmpfunc) _ped_Alignment_compare,
+  /* .tp_repr = XXX */
+  /* .tp_as_number = XXX */
+  /* .tp_as_sequence = XXX */
 diff -up pyparted-3.9.5/include/typeobjects/pytimer.h.orig pyparted-3.9.5/include/typeobjects/pytimer.h
 --- pyparted-3.9.5/include/typeobjects/pytimer.h.orig	2014-06-24 13:06:32.000000000 -0400
 +++ pyparted-3.9.5/include/typeobjects/pytimer.h	2015-04-24 14:46:46.316767442 -0400
@@ -64,6 +261,280 @@ diff -up pyparted-3.9.5/setup.py.orig pyparted-3.9.5/setup.py
      if not float(modversion) >= float(version):
          sys.stderr.write("*** Minimum required %s version: %s, found: %s\n" % (module, version, modversion,))
          sys.exit(1)
+diff -up pyparted-3.9.5/src/pyconstraint.c.orig pyparted-3.9.5/src/pyconstraint.c
+--- pyparted-3.9.5/src/pyconstraint.c.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/pyconstraint.c	2015-04-24 15:01:20.001767442 -0400
+@@ -50,32 +50,6 @@ void _ped_Constraint_dealloc(_ped_Constr
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_Constraint_compare(_ped_Constraint *self, PyObject *obj) {
+-    _ped_Constraint *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_Constraint_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.Constraint");
+-        return -1;
+-    }
+-
+-    comp = (_ped_Constraint *) obj;
+-    if ((_ped_Alignment_Type_obj.tp_richcompare(self->start_align, comp->start_align, Py_EQ)) &&
+-        (_ped_Alignment_Type_obj.tp_richcompare(self->end_align, comp->end_align, Py_EQ)) &&
+-        (_ped_Geometry_Type_obj.tp_richcompare(self->start_range, comp->start_range, Py_EQ)) &&
+-        (_ped_Geometry_Type_obj.tp_richcompare(self->end_range, comp->end_range, Py_EQ)) &&
+-        (self->min_size == comp->min_size) &&
+-        (self->max_size == comp->max_size)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_Constraint_richcompare(_ped_Constraint *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_Constraint_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pydevice.c.orig pyparted-3.9.5/src/pydevice.c
+--- pyparted-3.9.5/src/pydevice.c.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/pydevice.c	2015-04-24 15:02:02.152767442 -0400
+@@ -36,29 +36,6 @@ void _ped_CHSGeometry_dealloc(_ped_CHSGe
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_CHSGeometry_compare(_ped_CHSGeometry *self, PyObject *obj) {
+-    _ped_CHSGeometry *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_CHSGeometry_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.CHSGeometry");
+-        return -1;
+-    }
+-
+-    comp = (_ped_CHSGeometry *) obj;
+-    if ((self->cylinders == comp->cylinders) &&
+-        (self->heads == comp->heads) &&
+-        (self->sectors == comp->sectors)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_CHSGeometry_richcompare(_ped_CHSGeometry *a, PyObject *b,
+                                        int op) {
+     if (op == Py_EQ) {
+@@ -139,41 +116,6 @@ void _ped_Device_dealloc(_ped_Device *se
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_Device_compare(_ped_Device *self, PyObject *obj) {
+-    _ped_Device *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_Device_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.Device");
+-        return -1;
+-    }
+-
+-    comp = (_ped_Device *) obj;
+-    if ((!strcmp(self->model, comp->model)) &&
+-        (!strcmp(self->path, comp->path)) &&
+-        (self->type == comp->type) &&
+-        (self->sector_size == comp->sector_size) &&
+-        (self->phys_sector_size == comp->phys_sector_size) &&
+-        (self->length == comp->length) &&
+-        (self->open_count == comp->open_count) &&
+-        (self->read_only == comp->read_only) &&
+-        (self->external_mode == comp->external_mode) &&
+-        (self->dirty == comp->dirty) &&
+-        (self->boot_dirty == comp->dirty) &&
+-        (_ped_CHSGeometry_Type_obj.tp_richcompare(self->hw_geom, comp->hw_geom, Py_EQ)) &&
+-        (_ped_CHSGeometry_Type_obj.tp_richcompare(self->bios_geom, comp->bios_geom, Py_EQ)) &&
+-        (self->host == comp->host) &&
+-        (self->did == comp->did)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_Device_richcompare(_ped_Device *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_Device_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pydisk.c.orig pyparted-3.9.5/src/pydisk.c
+--- pyparted-3.9.5/src/pydisk.c.orig	2015-04-24 14:46:46.312767442 -0400
++++ pyparted-3.9.5/src/pydisk.c	2015-04-24 15:02:16.280767442 -0400
+@@ -47,31 +47,6 @@ void _ped_Partition_dealloc(_ped_Partiti
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_Partition_compare(_ped_Partition *self, PyObject *obj) {
+-    _ped_Partition *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_Partition_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.Partition");
+-        return -1;
+-    }
+-
+-    comp = (_ped_Partition *) obj;
+-    if ((_ped_Disk_Type_obj.tp_richcompare(self->disk, comp->disk, Py_EQ)) &&
+-        (_ped_Geometry_Type_obj.tp_richcompare(self->geom, comp->geom, Py_EQ)) &&
+-        (self->ped_partition->num == comp->ped_partition->num) &&
+-        (self->type == comp->type) &&
+-        (_ped_FileSystemType_Type_obj.tp_richcompare(self->fs_type, comp->fs_type, Py_EQ))) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_Partition_richcompare(_ped_Partition *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_Partition_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pyfilesys.c.orig pyparted-3.9.5/src/pyfilesys.c
+--- pyparted-3.9.5/src/pyfilesys.c.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/pyfilesys.c	2015-04-24 15:02:40.112767442 -0400
+@@ -38,27 +38,6 @@ void _ped_FileSystemType_dealloc(_ped_Fi
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_FileSystemType_compare(_ped_FileSystemType *self, PyObject *obj) {
+-    _ped_FileSystemType *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_FileSystemType_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.FileSystemType");
+-        return -1;
+-    }
+-
+-    comp = (_ped_FileSystemType *) obj;
+-    if (!strcmp(self->name, comp->name)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_FileSystemType_richcompare(_ped_FileSystemType *a, PyObject *b,
+                                           int op) {
+     if (op == Py_EQ) {
+@@ -137,30 +116,6 @@ void _ped_FileSystem_dealloc(_ped_FileSy
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_FileSystem_compare(_ped_FileSystem *self, PyObject *obj) {
+-    _ped_FileSystem *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_FileSystem_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.FileSystem");
+-        return -1;
+-    }
+-
+-    comp = (_ped_FileSystem *) obj;
+-    if ((_ped_FileSystemType_Type_obj.tp_richcompare(self->type, comp->type, Py_EQ)) &&
+-        (_ped_Geometry_Type_obj.tp_richcompare(self->geom, comp->geom, Py_EQ)) &&
+-        (self->checked == comp->checked)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-
+-}
+-
+ PyObject *_ped_FileSystem_richcompare(_ped_FileSystem *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_FileSystem_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pygeom.c.orig pyparted-3.9.5/src/pygeom.c
+--- pyparted-3.9.5/src/pygeom.c.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/pygeom.c	2015-04-24 15:02:53.984767442 -0400
+@@ -43,30 +43,6 @@ void _ped_Geometry_dealloc(_ped_Geometry
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_Geometry_compare(_ped_Geometry *self, PyObject *obj) {
+-    _ped_Geometry *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_Geometry_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.Geometry");
+-        return -1;
+-    }
+-
+-    comp = (_ped_Geometry *) obj;
+-    if ((_ped_Geometry_Type_obj.tp_richcompare(self->dev, comp->dev, Py_EQ)) &&
+-        (self->ped_geometry->start == comp->ped_geometry->start) &&
+-        (self->ped_geometry->length == comp->ped_geometry->length) &&
+-        (self->ped_geometry->end == comp->ped_geometry->end)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_Geometry_richcompare(_ped_Geometry *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_Geometry_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pynatmath.c.orig pyparted-3.9.5/src/pynatmath.c
+--- pyparted-3.9.5/src/pynatmath.c.orig	2014-06-24 13:06:32.000000000 -0400
++++ pyparted-3.9.5/src/pynatmath.c	2015-04-24 15:03:07.816767442 -0400
+@@ -36,28 +36,6 @@ void _ped_Alignment_dealloc(_ped_Alignme
+     PyObject_GC_Del(self);
+ }
+ 
+-int _ped_Alignment_compare(_ped_Alignment *self, PyObject *obj) {
+-    _ped_Alignment *comp = NULL;
+-    int check = PyObject_IsInstance(obj, (PyObject *) &_ped_Alignment_Type_obj);
+-
+-    if (PyErr_Occurred()) {
+-        return -1;
+-    }
+-
+-    if (!check) {
+-        PyErr_SetString(PyExc_ValueError, "object comparing to must be a _ped.Alignment");
+-        return -1;
+-    }
+-
+-    comp = (_ped_Alignment *) obj;
+-    if ((self->offset == comp->offset) &&
+-        (self->grain_size == comp->grain_size)) {
+-        return 0;
+-    } else {
+-        return 1;
+-    }
+-}
+-
+ PyObject *_ped_Alignment_richcompare(_ped_Alignment *a, PyObject *b, int op) {
+     if (op == Py_EQ) {
+         if (!(_ped_Alignment_Type_obj.tp_compare((PyObject *) a, b))) {
 diff -up pyparted-3.9.5/src/pytimer.c.orig pyparted-3.9.5/src/pytimer.c
 --- pyparted-3.9.5/src/pytimer.c.orig	2014-06-24 13:06:32.000000000 -0400
 +++ pyparted-3.9.5/src/pytimer.c	2015-04-24 14:46:46.316767442 -0400
@@ -101,3 +572,4 @@ diff -up pyparted-3.9.5/src/pytimer.c.orig pyparted-3.9.5/src/pytimer.c
  PyObject *_ped_Timer_richcompare(_ped_Timer *a, PyObject *b, int op) {
      if (op == Py_EQ) {
          if (!(_ped_Timer_Type_obj.tp_compare((PyObject *) a, b))) {
+diff -up pyparted-3.9.5/src/pyunit.c.orig pyparted-3.9.5/src/pyunit.c
-- 
cgit v0.10.2


	http://pkgs.fedoraproject.org/cgit/pyparted.git/commit/?h=f21&id=18fef2b4f38cb9f0f536e91bb1ba409262116d4a


More information about the scm-commits mailing list