1
0
mirror of https://github.com/postgres/postgres.git synced 2025-06-25 01:02:05 +03:00

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
This commit is contained in:
Bruce Momjian
2001-05-25 15:34:50 +00:00
parent 3f7c542a60
commit dffb673692
10 changed files with 210 additions and 20 deletions

View File

@ -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);