On 26 June 2013 12:04, Ronan Dunklau <rdunk...@gmail.com> wrote:

> It seems like you confused me with steve :)
>
>
Hi Ronan,
Oh, yes. I'm sorry for that :)


> The patch applies cleanly, and the regression tests pass on python2 when
> cdecimal is not installed. When it is, the type info returned for the
> converted numeric value is cdecimal.Decimal instead of decimal.Decimal.
>
> The regression tests expected output have not been modified for python3,
> and as such they fail on the type conversions.
>
> I am a bit confused with the use of PyModule_GetDict: shouldn't
> PyObj_GetAttrString be used directly instead ? Moreover, the reference
> count in the current implementation might be off: the reference count for
> the decimal module is never decreased, while the reference count to the
> module dict is, when the docs say it returns a borrowed reference.
>
> Please find a patch that fixes both issues.
>
>
Thanks for the patch. I assume you generated that from clean trunk, and it
includes all the changes (mine and yours) right?

I've checked the patch, everything looks great.
I've attached it to this email with changed name, just for consistent
naming in commitfest app.

thanks,
Szymon

Attachment: plpython_decimal_v4.patch
Description: Binary data

-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to