rpms/libieee1284/devel libieee1284-strict-aliasing.patch, NONE, 1.1 libieee1284.spec, 1.22, 1.23

Tim Waugh twaugh at fedoraproject.org
Wed Jun 23 12:10:04 UTC 2010


Author: twaugh

Update of /cvs/pkgs/rpms/libieee1284/devel
In directory cvs01.phx2.fedoraproject.org:/tmp/cvs-serv8674

Modified Files:
	libieee1284.spec 
Added Files:
	libieee1284-strict-aliasing.patch 
Log Message:
* Wed Jun 23 2010 Tim Waugh <twaugh at redhat.com> 0.2.11-9
- The python sub-package now requires the exactly-matching main
  package (bug #605169).
- Fixed strict aliasing warnings (bug #605170).


libieee1284-strict-aliasing.patch:
 ieee1284module.c |   33 ++++++++++++++++++++++++++++-----
 1 file changed, 28 insertions(+), 5 deletions(-)

--- NEW FILE libieee1284-strict-aliasing.patch ---
diff -up libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing libieee1284-0.2.11/src/ieee1284module.c
--- libieee1284-0.2.11/src/ieee1284module.c.strict-aliasing	2004-02-03 11:50:57.000000000 +0000
+++ libieee1284-0.2.11/src/ieee1284module.c	2010-06-23 12:36:05.093026807 +0100
@@ -28,6 +28,17 @@ typedef struct {
 	struct parport *port;
 } ParportObject;
 
+static PyObject *
+Parport_new (PyTypeObject *type, PyObject *args, PyObject *kwds)
+{
+  ParportObject *self;
+  self = (ParportObject *) type->tp_alloc (type, 0);
+  if (self != NULL)
+    self->port = NULL;
+
+  return (PyObject *) self;
+}
+
 static int
 Parport_init (ParportObject *self, PyObject *args, PyObject *kwds)
 {
@@ -562,6 +573,23 @@ static PyTypeObject ParportType = {
 	0,					/* tp_as_buffer */
 	Py_TPFLAGS_DEFAULT,			/* tp_flags */
 	"parallel port object",			/* tp_doc */
+	0,					/* tp_traverse */
+	0,					/* tp_clear */
+	0,					/* tp_richcompare */
+	0,					/* tp_weaklistoffset */
+	0,					/* tp_iter */
+	0,					/* tp_iternext */
+	Parport_methods,			/* tp_methods */
+	0,					/* tp_members */
+	Parport_getseters,			/* tp_getset */
+	0,					/* tp_base */
+	0,					/* tp_dict */
+	0,					/* tp_descr_get */
+	0,					/* tp_descr_set */
+	0,					/* tp_dictoffset */
+	(initproc)Parport_init,			/* tp_init */
+	0,					/* tp_alloc */
+	Parport_new,		                /* tp_new */
 };
 
 static PyObject *
@@ -625,14 +653,9 @@ initieee1284 (void)
 	PyObject *d = PyModule_GetDict (m);
 	PyObject *c;
 
-	ParportType.tp_new = PyType_GenericNew;
-	ParportType.tp_init = (initproc) Parport_init;
-	ParportType.tp_getset = Parport_getseters;
-	ParportType.tp_methods = Parport_methods;
 	if (PyType_Ready (&ParportType) < 0)
 		return;
 
-	Py_INCREF (&ParportType);
 	PyModule_AddObject (m, "Parport", (PyObject *) &ParportType);
 
 	pyieee1284_error = PyErr_NewException("ieee1284.error", NULL, NULL);


Index: libieee1284.spec
===================================================================
RCS file: /cvs/pkgs/rpms/libieee1284/devel/libieee1284.spec,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -p -r1.22 -r1.23
--- libieee1284.spec	25 Jul 2009 05:57:40 -0000	1.22
+++ libieee1284.spec	23 Jun 2010 12:10:04 -0000	1.23
@@ -6,6 +6,7 @@ License: GPLv2+
 Group: System Environment/Libraries
 URL: http://cyberelk.net/tim/libieee1284/
 Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.bz2
+Patch1: libieee1284-strict-aliasing.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildRequires: xmlto, python-devel
 
@@ -23,6 +24,7 @@ developing applications that use libieee
 
 %package python
 Summary: Python extension module for libieee1284
+Requires: %{name} = %{version}-%{release}
 Group: System Environment/Libraries
 
 %description python
@@ -31,6 +33,7 @@ use 'import ieee1284'.
 
 %prep
 %setup -q
+%patch1 -p1 -b .strict-aliasing
 
 %build
 touch doc/interface.xml
@@ -68,6 +71,11 @@ rm -rf %{buildroot}
 %postun -p /sbin/ldconfig
 
 %changelog
+* Wed Jun 23 2010 Tim Waugh <twaugh at redhat.com> 0.2.11-9
+- The python sub-package now requires the exactly-matching main
+  package (bug #605169).
+- Fixed strict aliasing warnings (bug #605170).
+
 * Fri Jul 24 2009 Fedora Release Engineering <rel-eng at lists.fedoraproject.org> - 0.2.11-8
 - Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
 



More information about the scm-commits mailing list