Skip site navigation (1) Skip section navigation (2)

Re: Problem with python compile

From: "D'Arcy J(dot)M(dot) Cain" <darcy(at)druid(dot)net>
To: Bernhard Herzog <bh(at)intevation(dot)de>,Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: PostgreSQL-interfaces <pgsql-interfaces(at)postgresql(dot)org>,dwallace(at)udel(dot)edu
Subject: Re: Problem with python compile
Date: 2002-03-25 12:38:32
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-interfaces
On March 25, 2002 06:18 am, Bernhard Herzog wrote:
> Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)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(at){druid|vex}.net>   |  Democracy is three wolves                |  and a sheep voting on
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.

In response to


pgsql-interfaces by date

Next:From: Bernhard HerzogDate: 2002-03-25 13:36:52
Subject: Re: Problem with python compile
Previous:From: D'Arcy J.M. CainDate: 2002-03-25 12:15:17
Subject: Re: Problem with python compile

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group