Re: Problem with python compile - Mailing list pgsql-interfaces

From D'Arcy J.M. Cain
Subject Re: Problem with python compile
Date
Msg-id 20020325123833.33A161C6B@druid.net
Whole thread Raw
In response to Re: Problem with python compile  (Bernhard Herzog <bh@intevation.de>)
Responses Re: Problem with python compile
List pgsql-interfaces
On March 25, 2002 06:18 am, Bernhard Herzog wrote:
> Bruce Momjian <pgman@candle.pha.pa.us> writes:
> > This is with python 1.5.  I suggest that we should reverse out this
> > patch. The fix for --with-pymalloc clearly is causing problems for
> > regular compiles.
>
> This depends on the Python version. PyObject_DEL (which really should be
> PyObject_Del, i.e. the function not the macro) is not defined in 1.5 but
> it's defined in 2.x and the proper way to free memory allocated with
> PyObject_New. In 1.5 PyMem_Del is OK.
>
> If you want compatibility from 1.5.2 up to 2.2 with pymalloc something
> like this should work, I think:
>
> #if PY_VERSION_HEX < 0x01060000
> #define PyObject_Del(op) PyMem_Del((op))
> #endif

I will do that but I wonder what is wrong with the macro?

I also note that the Python source was just changed a few days ago in this
area.  It looks like everything is going to effectively use the mem functions
anyway so this change may not matter eventually.  However, that won't apply
until the next release and we will still want to support 2.2 after that so
I will continue with the suggested change but please discuss this issue
between PyObject_DEL and PyObject_Del first.  I don't mind using the function
here but I just want to know your reasoning.

-- 
D'Arcy J.M. Cain <darcy@{druid|vex}.net>   |  Democracy is three wolves
http://www.druid.net/darcy/                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.


pgsql-interfaces by date:

Previous
From: "D'Arcy J.M. Cain"
Date:
Subject: Re: Problem with python compile
Next
From: Bernhard Herzog
Date:
Subject: Re: Problem with python compile