aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python/pgmodule.c
diff options
context:
space:
mode:
authorD'Arcy J.M. Cain <darcy@druid.net>2001-03-15 11:26:22 +0000
committerD'Arcy J.M. Cain <darcy@druid.net>2001-03-15 11:26:22 +0000
commit37d67eb15955f72d432c1fc768d579cb714bf3d5 (patch)
tree866c9841f8082d871dc65ede2bde17a44516f368 /src/interfaces/python/pgmodule.c
parentd584bf4867affcd00998335a8eab24ae01c8be34 (diff)
downloadpostgresql-37d67eb15955f72d432c1fc768d579cb714bf3d5.tar.gz
postgresql-37d67eb15955f72d432c1fc768d579cb714bf3d5.zip
Add WIN32 support.
Diffstat (limited to 'src/interfaces/python/pgmodule.c')
-rw-r--r--src/interfaces/python/pgmodule.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c
index 99911a97f6a..70f8c02f10e 100644
--- a/src/interfaces/python/pgmodule.c
+++ b/src/interfaces/python/pgmodule.c
@@ -91,6 +91,10 @@ const char *__movename[5] =
#define DEFAULT_VARS 1 /* enables default variables use */
#endif /* NO_DEF_VAR */
+#ifdef MS_WIN32
+#define NO_SNPRINTF 1
+#endif
+
/* --------------------------------------------------------------------- */
/* MODULE GLOBAL VARIABLES */
@@ -937,7 +941,12 @@ pgsource_print(pgsourceobject * self, FILE *fp, int flags)
/* query type definition */
staticforward PyTypeObject PgSourceType = {
+#ifndef MS_WIN32
PyObject_HEAD_INIT(&PyType_Type)
+#else
+ PyObject_HEAD_INIT(NULL)
+#endif
+
0, /* ob_size */
"pgsourceobject", /* tp_name */
sizeof(pgsourceobject), /* tp_basicsize */
@@ -3075,8 +3084,7 @@ static struct PyMethodDef pg_methods[] = {
static char pg__doc__[] = "Python interface to PostgreSQL DB";
/* Initialization function for the module */
-void init_pg(void); /* Python doesn't prototype this */
-void
+DL_EXPORT(void)
init_pg(void)
{
PyObject *mod, *dict, *v;