FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > Debian > Debian Kernel

 
 
LinkBack Thread Tools
 
Old 02-25-2009, 08:09 PM
Joel Granados
 
Default PATCH : pyblock: Py_GenericNew does not do anything with its args argument.

took me some time to understand but it looks fine to me.
On Wed, Feb 25, 2009 at 08:16:42PM +0100, Hans de Goede wrote:
> Py_GenericNew does not do anything with its args argument, so no need to
> build one.
> ---
> dmraid.c | 9 ++-------
> 1 files changed, 2 insertions(+), 7 deletions(-)
>
> diff --git a/dmraid.c b/dmraid.c
> index 5b5cf6c..51d4ad6 100644
> --- a/dmraid.c
> +++ b/dmraid.c
> @@ -850,7 +850,7 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
> struct raid_set *rs = set->rs;
>
> PyObject *m = NULL, *md = NULL;
> - PyObject *type = NULL, *args = NULL;
> + PyObject *type = NULL;
> PyObject *map = NULL, *table = NULL;
>
> PyObject *iret = NULL;
> @@ -859,10 +859,6 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
> if (!table)
> goto out;
>
> - args = Py_BuildValue("(sO)", rs->name, table);
> - if (!args)
> - goto out;
> -
> m = PyImport_ImportModule("block.dm");
> if (!m)
> goto out;
> @@ -875,7 +871,7 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
> if (!type)
> goto out;
>
> - map = PyType_GenericNew((PyTypeObject *)type, args, NULL);
> + map = PyType_GenericNew((PyTypeObject *)type, NULL, NULL);
> if (!map)
> goto out;
>
> @@ -887,7 +883,6 @@ pydmraid_raidset_get_map(PyObject *self, void *data)
>
> out:
> Py_XDECREF(iret);
> - Py_XDECREF(args);
> Py_XDECREF(table);
> if (!map && !PyErr_Occurred()) {
> if (errno != 0)
> --
> 1.6.1.3
>
> _______________________________________________
> Anaconda-devel-list mailing list
> Anaconda-devel-list@redhat.com
> https://www.redhat.com/mailman/listinfo/anaconda-devel-list

--
Joel Andres Granados
Brno, Czech Republic, Red Hat.

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 09:37 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org