Re: PL/Python warnings in CVS HEAD

From: "Marko Kreen" <markokr(at)gmail(dot)com>
To: "Bruce Momjian" <bruce(at)momjian(dot)us>
Cc: "Tom Lane" <tgl(at)sss(dot)pgh(dot)pa(dot)us>, "Neil Conway" <neilc(at)samurai(dot)com>, "Joshua D(dot) Drake" <jd(at)commandprompt(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: PL/Python warnings in CVS HEAD
Date: 2007-04-04 08:41:05
Message-ID: e51f66da0704040141g288969ehf97a57a6215a2f15@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On 4/3/07, Bruce Momjian <bruce(at)momjian(dot)us> wrote:
> Great, patch applied and TODO item removed.

If you are already patching, please apply the following patch also.

It removes last remaining casts inside struct definitions.
Such usage is bad practice, as it hides problems from compiler.

Reason for the cast is popular practice in some circles
to define functions as foo(MyObj *) instead of foo(PyObject *)
thus avoiding a local variable inside functions and make
direct calling easier. As pl/python does not use such style,
the casts were unnecessary from the start.

--
marko

Attachment Content-Type Size
plpy-uglycasts.diff application/octet-stream 1.4 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2007-04-04 08:57:16 Vacuum in multi-statement
Previous Message Heikki Linnakangas 2007-04-04 08:39:40 Vacuum in multi-statement