[Python-checkins] CVS: python/dist/src/Mac/Modules/waste wastemodule.c,1.18,1.18.8.1
Jack Jansen
jackjansen@users.sourceforge.net
2001年11月29日 05:21:20 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/waste
In directory usw-pr-cvs1:/tmp/cvs-serv22584/Python/Mac/Modules/waste
Modified Files:
Tag: r22b2-branch
wastemodule.c
Log Message:
Use the WeakLink generators where it makes sense. This allows the resulting module to be imported on older versions of MacOS that do not support all routines encasulated in the module. Using a routine thats unavailable results in a RuntimeError, "Routine not available on this platform".
Index: wastemodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/waste/wastemodule.c,v
retrieving revision 1.18
retrieving revision 1.18.8.1
diff -C2 -d -r1.18 -r1.18.8.1
*** wastemodule.c 2001年09月05日 15:42:53 1.18
--- wastemodule.c 2001年11月29日 13:21:18 1.18.8.1
***************
*** 6,15 ****
- #ifdef _WIN32
- #include "pywintoolbox.h"
- #else
#include "macglue.h"
#include "pymactoolbox.h"
- #endif
/* Macro to test whether a weak-loaded CFM function exists */
--- 6,11 ----
***************
*** 349,353 ****
PyTypeObject WEO_Type = {
! PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
"WEO", /*tp_name*/
--- 345,349 ----
PyTypeObject WEO_Type = {
! PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"WEO", /*tp_name*/
***************
*** 1714,1718 ****
PyTypeObject waste_Type = {
! PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
"waste", /*tp_name*/
--- 1710,1714 ----
PyTypeObject waste_Type = {
! PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"waste", /*tp_name*/