Re: Async branch documentation and review

Michael Tharp <gxti-1pawZKhx9Om5WRpDikjj11aTQe2KTcn/@public.gmane.org> Thu, 08 Apr 2010 13:43:52 -0400
Newsgroups gmane.comp.python.db.psycopg.devel
Message-ID <[email protected]>
Hello,

On 04/08/2010 08:33 AM, Daniele Varrazzo wrote:
> I've written documentation for the new Psycopg async support. Together
> with other patches it is available in the "fix22" branch of my git
> repos:

Commit d339466c6a54414b502a71066cef5849b1f5b63c breaks Python 2.4 
compatibility by using PyInt_FromSsize_t. This can, of course, be fixed 
by adding a new macro to psycopg/python.h:

diff --git a/psycopg/python.h b/psycopg/python.h
index 6a02138..4d7333f 100644
--- a/psycopg/python.h
+++ b/psycopg/python.h
@@ -39,6 +39,7 @@
    #define PY_SSIZE_T_MIN INT_MIN
    #define PY_SSIZE_T_MAX INT_MAX
    #define PY_FORMAT_SIZE_T ""
+  #define PyInt_FromSsize_t(x) PyInt_FromLong((x))

    #define readbufferproc getreadbufferproc
    #define writebufferproc getwritebufferproc

-- m. tharp