aboutsummaryrefslogtreecommitdiff
path: root/src/interfaces/python/pgmodule.c
diff options
context:
space:
mode:
authorBruce Momjian <bruce@momjian.us>2001-05-25 15:34:50 +0000
committerBruce Momjian <bruce@momjian.us>2001-05-25 15:34:50 +0000
commitdffb673692f96a6cc52411762b8ba07201687313 (patch)
tree7acaeec28897f6210054bbdf038c93dbf9479a92 /src/interfaces/python/pgmodule.c
parent3f7c542a605ae59a457f6665cda5525a7c650978 (diff)
downloadpostgresql-dffb673692f96a6cc52411762b8ba07201687313.tar.gz
postgresql-dffb673692f96a6cc52411762b8ba07201687313.zip
While changing Cygwin Python to build its core as a DLL (like Win32
Python) to support shared extension modules, I have learned that Guido prefers the style of the attached patch to solve the above problem. I feel that this solution is particularly appropriate in this case because the following: PglargeType PgType PgQueryType are already being handled in the way that I am proposing for PgSourceType. Jason Tishler
Diffstat (limited to 'src/interfaces/python/pgmodule.c')
-rw-r--r--src/interfaces/python/pgmodule.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/interfaces/python/pgmodule.c b/src/interfaces/python/pgmodule.c
index a1ce3cd33fe..9cfcd40e530 100644
--- a/src/interfaces/python/pgmodule.c
+++ b/src/interfaces/python/pgmodule.c
@@ -947,11 +947,7 @@ 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 */
@@ -3141,7 +3137,8 @@ init_pg(void)
*v;
/* Initialize here because some WIN platforms get confused otherwise */
- PglargeType.ob_type = PgType.ob_type = PgQueryType.ob_type = &PyType_Type;
+ PglargeType.ob_type = PgType.ob_type = PgQueryType.ob_type =
+ PgSourceType.ob_type = &PyType_Type;
/* Create the module and add the functions */
mod = Py_InitModule4("_pg", pg_methods, pg__doc__, NULL, PYTHON_API_VERSION);