Piet Delport patches: final cleanup and PEP 353 macros.

This commit is contained in:
Federico Di Gregorio 2006-09-23 05:19:30 +00:00
parent 1d8af808bf
commit 1fe6269904
2 changed files with 9 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2006-09-23 Federico Di Gregorio <fog@initd.org>
* psycopg/psycopg.h: applied compatibility macros from PEP 353.
* Applied patch 1/3 from Piet Delport; from his email:
psycopg2-Py_ssize_t-input.diff adjusts variables used for parameters
and return values. These changes only prevent overflowing on values

View File

@ -28,6 +28,13 @@
extern "C" {
#endif
/* Python 2.5 ssize_t compatibility */
#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
typedef int Py_ssize_t;
#define PY_SSIZE_T_MAX INT_MAX
#define PY_SSIZE_T_MIN INT_MIN
#endif
/* DBAPI compliance parameters */
#define APILEVEL "2.0"
#define THREADSAFETY 2