diff options
author | Federico Di Gregorio <fog@initd.org> | 2007-04-10 06:36:18 +0000 |
---|---|---|
committer | Federico Di Gregorio <fog@initd.org> | 2007-04-10 06:36:18 +0000 |
commit | e5829292cdecd56e883733aee552d6fe2121c6ac (patch) | |
tree | c7d26880bf00e83d28e65f90aaaf5a581a33796c /psycopg/adapter_datetime.h | |
parent | fadd1a69386ae83ef316f3aee03b2867d8d9fe12 (diff) | |
download | psycopg2-e5829292cdecd56e883733aee552d6fe2121c6ac.tar.gz |
Fixed both Python 2.5 and 64 bit problems.
Diffstat (limited to 'psycopg/adapter_datetime.h')
-rw-r--r-- | psycopg/adapter_datetime.h | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/psycopg/adapter_datetime.h b/psycopg/adapter_datetime.h index 0827fe3..4530b9a 100644 --- a/psycopg/adapter_datetime.h +++ b/psycopg/adapter_datetime.h @@ -22,6 +22,7 @@ #ifndef PSYCOPG_DATETIME_H #define PSYCOPG_DATETIME_H 1 +#define PY_SSIZE_T_CLEAN #include <Python.h> #ifdef __cplusplus @@ -38,14 +39,14 @@ typedef struct { #define PSYCO_DATETIME_TIME 0 #define PSYCO_DATETIME_DATE 1 #define PSYCO_DATETIME_TIMESTAMP 2 -#define PSYCO_DATETIME_INTERVAL 3 - +#define PSYCO_DATETIME_INTERVAL 3 + } pydatetimeObject; - - + + /* functions exported to psycopgmodule.c */ #ifdef PSYCOPG_DEFAULT_PYDATETIME - + extern PyObject *psyco_Date(PyObject *module, PyObject *args); #define psyco_Date_doc \ "Date(year, month, day) -> new date\n\n" \ @@ -99,7 +100,7 @@ extern PyObject *psyco_TimestampFromPy(PyObject *module, PyObject *args); extern PyObject *psyco_IntervalFromPy(PyObject *module, PyObject *args); #define psyco_IntervalFromPy_doc \ "IntervalFromPy(datetime.timedelta) -> new wrapper" - + #ifdef __cplusplus } #endif |