[Python-checkins] CVS: python/dist/src/Mac/Modules/res _Resmodule.c,1.4,1.4.8.1
Jack Jansen
jackjansen@users.sourceforge.net
2001年11月29日 05:21:39 -0800
Update of /cvsroot/python/python/dist/src/Mac/Modules/res
In directory usw-pr-cvs1:/tmp/cvs-serv22707/Python/Mac/Modules/res
Modified Files:
Tag: r22b2-branch
_Resmodule.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: _Resmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Mac/Modules/res/_Resmodule.c,v
retrieving revision 1.4
retrieving revision 1.4.8.1
diff -C2 -d -r1.4 -r1.4.8.1
*** _Resmodule.c 2001年09月05日 15:43:11 1.4
--- _Resmodule.c 2001年11月29日 13:21:37 1.4.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 ----
***************
*** 551,555 ****
PyTypeObject Resource_Type = {
! PyObject_HEAD_INIT(&PyType_Type)
0, /*ob_size*/
"Resource", /*tp_name*/
--- 547,551 ----
PyTypeObject Resource_Type = {
! PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Resource", /*tp_name*/