Index: makefiles/Makefile.win =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/makefiles/Makefile.win,v retrieving revision 1.11 diff -u -p -r1.11 Makefile.win --- makefiles/Makefile.win 2001/05/03 16:07:52 1.11 +++ makefiles/Makefile.win 2001/05/15 12:26:01 @@ -27,3 +27,7 @@ endif ifeq ($(findstring ecpg/lib,$(subdir)), ecpg/lib) override CPPFLAGS+= -DBUILDING_DLL=1 endif + +ifeq ($(findstring src/pl/plpython,$(subdir)), src/pl/plpython) +override CPPFLAGS+= -DUSE_DL_IMPORT +endif Index: pl/plpython/Makefile =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpython/Makefile,v retrieving revision 1.6 diff -u -p -r1.6 Makefile --- pl/plpython/Makefile 2001/05/14 22:06:50 1.6 +++ pl/plpython/Makefile 2001/05/15 12:26:01 @@ -7,6 +7,8 @@ include $(top_builddir)/src/Makefile.glo override CPPFLAGS := -I$(srcdir) -I$(python_includedir) $(CPPFLAGS) +override DLLLIBS := $(BE_DLLLIBS) $(DLLLIBS) + NAME = plpython SO_MAJOR_VERSION = 0 SO_MINOR_VERSION = 0 Index: pl/plpython/feature.expected =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpython/feature.expected,v retrieving revision 1.2 diff -u -p -r1.2 feature.expected --- pl/plpython/feature.expected 2001/05/12 17:49:32 1.2 +++ pl/plpython/feature.expected 2001/05/15 12:26:01 @@ -29,7 +29,7 @@ SELECT global_test_two(); (1 row) SELECT import_fail(); -NOTICE: ('import socket failed -- untrusted dynamic module: socket',) +NOTICE: ('import socket failed -- untrusted dynamic module: _socket',) import_fail -------------------- failed as expected Index: pl/plpython/plpython.c =================================================================== RCS file: /home/projects/pgsql/cvsroot/pgsql/src/pl/plpython/plpython.c,v retrieving revision 1.2 diff -u -p -r1.2 plpython.c --- pl/plpython/plpython.c 2001/05/12 01:30:30 1.2 +++ pl/plpython/plpython.c 2001/05/15 12:26:02 @@ -1534,7 +1534,7 @@ static PyObject *PLy_spi_execute_fetch_r PyTypeObject PLy_PlanType = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ "PLyPlan", /*tp_name*/ sizeof(PLyPlanObject), /*tp_size*/ @@ -1577,7 +1577,7 @@ PySequenceMethods PLy_result_as_sequence }; PyTypeObject PLy_ResultType = { - PyObject_HEAD_INIT(&PyType_Type) + PyObject_HEAD_INIT(NULL) 0, /*ob_size*/ "PLyResult", /*tp_name*/ sizeof(PLyResultObject), /*tp_size*/ @@ -2287,6 +2287,7 @@ PLy_init_plpy(void) /* initialize plpy module */ + PLy_PlanType.ob_type = PLy_ResultType.ob_type = &PyType_Type; plpy = Py_InitModule("plpy", PLy_methods); plpy_dict = PyModule_GetDict(plpy);