summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--psycopg/adapter_asis.c2
-rw-r--r--psycopg/adapter_binary.c2
-rw-r--r--psycopg/adapter_datetime.c2
-rw-r--r--psycopg/adapter_list.c3
-rw-r--r--psycopg/adapter_mxdatetime.c2
-rw-r--r--psycopg/adapter_pboolean.c2
-rw-r--r--psycopg/adapter_pdecimal.c1
-rw-r--r--psycopg/adapter_pfloat.c1
-rw-r--r--psycopg/adapter_qstring.c2
-rw-r--r--psycopg/connection_type.c3
-rw-r--r--psycopg/cursor_type.c1
-rw-r--r--psycopg/lobject_type.c1
-rw-r--r--psycopg/microprotocols.c2
-rw-r--r--psycopg/microprotocols_proto.c3
-rw-r--r--psycopg/notify_type.c2
-rw-r--r--psycopg/python.h3
-rw-r--r--psycopg/typecast.c2
-rw-r--r--psycopg/xid_type.c2
18 files changed, 3 insertions, 33 deletions
diff --git a/psycopg/adapter_asis.c b/psycopg/adapter_asis.c
index b0e7bc8..0d0a7f6 100644
--- a/psycopg/adapter_asis.c
+++ b/psycopg/adapter_asis.c
@@ -29,8 +29,6 @@
#include "psycopg/adapter_asis.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <string.h>
diff --git a/psycopg/adapter_binary.c b/psycopg/adapter_binary.c
index ed477b7..cf31ccb 100644
--- a/psycopg/adapter_binary.c
+++ b/psycopg/adapter_binary.c
@@ -30,8 +30,6 @@
#include "psycopg/microprotocols_proto.h"
#include "psycopg/connection.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <string.h>
diff --git a/psycopg/adapter_datetime.c b/psycopg/adapter_datetime.c
index ec1f2d4..f640684 100644
--- a/psycopg/adapter_datetime.c
+++ b/psycopg/adapter_datetime.c
@@ -29,8 +29,6 @@
#include "psycopg/adapter_datetime.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <datetime.h>
#include <time.h>
diff --git a/psycopg/adapter_list.c b/psycopg/adapter_list.c
index 5384618..8bd6688 100644
--- a/psycopg/adapter_list.c
+++ b/psycopg/adapter_list.c
@@ -30,9 +30,6 @@
#include "psycopg/microprotocols.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
-
/* list_str, list_getquoted - return result of quoting */
diff --git a/psycopg/adapter_mxdatetime.c b/psycopg/adapter_mxdatetime.c
index 36ef48a..793dfba 100644
--- a/psycopg/adapter_mxdatetime.c
+++ b/psycopg/adapter_mxdatetime.c
@@ -30,8 +30,6 @@
#include "psycopg/adapter_mxdatetime.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <mxDateTime.h>
#include <string.h>
diff --git a/psycopg/adapter_pboolean.c b/psycopg/adapter_pboolean.c
index 73284a8..a74d9f3 100644
--- a/psycopg/adapter_pboolean.c
+++ b/psycopg/adapter_pboolean.c
@@ -29,8 +29,6 @@
#include "psycopg/adapter_pboolean.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <string.h>
diff --git a/psycopg/adapter_pdecimal.c b/psycopg/adapter_pdecimal.c
index c877eae..ed79ea1 100644
--- a/psycopg/adapter_pdecimal.c
+++ b/psycopg/adapter_pdecimal.c
@@ -29,7 +29,6 @@
#include "psycopg/adapter_pdecimal.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
#include <floatobject.h>
#include <math.h>
diff --git a/psycopg/adapter_pfloat.c b/psycopg/adapter_pfloat.c
index f75424e..f6ad636 100644
--- a/psycopg/adapter_pfloat.c
+++ b/psycopg/adapter_pfloat.c
@@ -29,7 +29,6 @@
#include "psycopg/adapter_pfloat.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
#include <floatobject.h>
#include <math.h>
diff --git a/psycopg/adapter_qstring.c b/psycopg/adapter_qstring.c
index d4338be..9da6a21 100644
--- a/psycopg/adapter_qstring.c
+++ b/psycopg/adapter_qstring.c
@@ -30,8 +30,6 @@
#include "psycopg/adapter_qstring.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
#include <string.h>
diff --git a/psycopg/connection_type.c b/psycopg/connection_type.c
index 0f10276..21e5e8e 100644
--- a/psycopg/connection_type.c
+++ b/psycopg/connection_type.c
@@ -33,9 +33,6 @@
#include "psycopg/green.h"
#include "psycopg/xid.h"
-#include <structmember.h>
-#include <stringobject.h>
-
#include <string.h>
#include <ctype.h>
diff --git a/psycopg/cursor_type.c b/psycopg/cursor_type.c
index 0a39896..cd62d50 100644
--- a/psycopg/cursor_type.c
+++ b/psycopg/cursor_type.c
@@ -34,7 +34,6 @@
#include "psycopg/microprotocols.h"
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
#include <string.h>
#include <stdlib.h>
diff --git a/psycopg/lobject_type.c b/psycopg/lobject_type.c
index 29dcddc..d07becb 100644
--- a/psycopg/lobject_type.c
+++ b/psycopg/lobject_type.c
@@ -32,7 +32,6 @@
#include "psycopg/microprotocols_proto.h"
#include "psycopg/pqpath.h"
-#include <structmember.h>
#include <string.h>
diff --git a/psycopg/microprotocols.c b/psycopg/microprotocols.c
index 8fd3346..f41d85f 100644
--- a/psycopg/microprotocols.c
+++ b/psycopg/microprotocols.c
@@ -31,8 +31,6 @@
#include "psycopg/cursor.h"
#include "psycopg/connection.h"
-#include <structmember.h>
-
/** the adapters registry **/
diff --git a/psycopg/microprotocols_proto.c b/psycopg/microprotocols_proto.c
index d929c56..775889d 100644
--- a/psycopg/microprotocols_proto.c
+++ b/psycopg/microprotocols_proto.c
@@ -28,9 +28,6 @@
#include "psycopg/microprotocols_proto.h"
-#include <structmember.h>
-#include <stringobject.h>
-
#include <string.h>
diff --git a/psycopg/notify_type.c b/psycopg/notify_type.c
index 0287312..3d2308a 100644
--- a/psycopg/notify_type.c
+++ b/psycopg/notify_type.c
@@ -28,8 +28,6 @@
#include "psycopg/notify.h"
-#include <structmember.h>
-
static const char notify_doc[] =
"A notification received from the backend.\n\n"
diff --git a/psycopg/python.h b/psycopg/python.h
index 6faa5b9..b514c2c 100644
--- a/psycopg/python.h
+++ b/psycopg/python.h
@@ -27,6 +27,9 @@
#define PSYCOPG_PYTHON_H 1
#include <structmember.h>
+#if PY_MAJOR_VERSION < 3
+#include <stringobject.h>
+#endif
#if PY_VERSION_HEX < 0x02040000
# error "psycopg requires Python >= 2.4"
diff --git a/psycopg/typecast.c b/psycopg/typecast.c
index 46b9c9f..47c3c58 100644
--- a/psycopg/typecast.c
+++ b/psycopg/typecast.c
@@ -26,8 +26,6 @@
#define PSYCOPG_MODULE
#include "psycopg/psycopg.h"
-#include <structmember.h>
-
#include "psycopg/typecast.h"
#include "psycopg/cursor.h"
diff --git a/psycopg/xid_type.c b/psycopg/xid_type.c
index 9aed22a..b725135 100644
--- a/psycopg/xid_type.c
+++ b/psycopg/xid_type.c
@@ -29,8 +29,6 @@
#include "psycopg/xid.h"
-#include <structmember.h>
-
static const char xid_doc[] =
"A transaction identifier used for two-phase commit.\n\n"