Merged changes made on r22b2-branch between r22b2 and r22b2-mac (the
changes from start of branch upto r22b2 were already merged, of course).
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py
index 329800c..cb49ed5 100755
--- a/Lib/test/regrtest.py
+++ b/Lib/test/regrtest.py
@@ -524,6 +524,7 @@
test_cl
test_commands
test_crypt
+ test_curses
test_dbm
test_dl
test_fcntl
diff --git a/Mac/Build/PythonCore.exp b/Mac/Build/PythonCore.exp
index 9b3e5aa..0b2b27f 100644
--- a/Mac/Build/PythonCore.exp
+++ b/Mac/Build/PythonCore.exp
@@ -313,6 +313,7 @@
PyNumber_Check
PyObject_AsWriteBuffer
PyObject_AsReadBuffer
+PyObject_CheckReadBuffer
PyObject_AsCharBuffer
PyObject_DelItem
PyObject_SetItem
@@ -1152,6 +1153,7 @@
__vt__11GUSIContext # GUSIContext::__vt
sError__11GUSIContext # GUSIContext::sError
sHasThreading__11GUSIContext # GUSIContext::sHasThreading
+sCreatingCurrentContext__11GUSIContext # GUSIContext::sCreatingCurrentContext
sCurrentContext__11GUSIContext # GUSIContext::sCurrentContext
sContexts__11GUSIContext # GUSIContext::sContexts
sInstance__11GUSIProcess # GUSIProcess::sInstance
@@ -1186,9 +1188,10 @@
CreateContext__18GUSIContextFactoryFPFPv_PvPvlUlPPvPUl # GUSIContextFactory::CreateContext(void* (*)(void*),void*,long,unsigned long,void**,unsigned long*)
__dt__18GUSIContextFactoryFv # GUSIContextFactory::~GUSIContextFactory()
__ct__18GUSIContextFactoryFv # GUSIContextFactory::GUSIContextFactory()
-__dt__Q23std68auto_ptr<18GUSIContextFactory,Q23std29_Single<18GUSIContextFactory>>Fv # std::auto_ptr<GUSIContextFactory, std::_Single<GUSIContextFactory>>::~auto_ptr()
+DeleteInstance__18GUSIContextFactoryFv # GUSIContextFactory::DeleteInstance()
SetInstance__18GUSIContextFactoryFP18GUSIContextFactory # GUSIContextFactory::SetInstance(GUSIContextFactory*)
Instance__18GUSIContextFactoryFv # GUSIContextFactory::Instance()
+GUSISetupContextFactory
GUSINewThread
Wakeup__11GUSIProcessFv # GUSIProcess::Wakeup()
Wakeup__11GUSIContextFv # GUSIContext::Wakeup()
@@ -1237,6 +1240,9 @@
CloseAllDescriptors__19GUSIDescriptorTableFv # GUSIDescriptorTable::CloseAllDescriptors()
SetInstance__19GUSIDescriptorTableFP19GUSIDescriptorTable # GUSIDescriptorTable::SetInstance(GUSIDescriptorTable*)
Instance__19GUSIDescriptorTableFv # GUSIDescriptorTable::Instance()
+GUSISetupDescriptorTable
+__ct__10GUSIDeviceFv # GUSIDevice::GUSIDevice()
+__ct__14GUSINullDeviceFv # GUSINullDevice::GUSINullDevice()
Instance__14GUSINullDeviceFv # GUSINullDevice::Instance()
GUSIDefaultSetupConsole
GUSISetupConsole
@@ -1366,6 +1372,7 @@
__ct__12GUSIFileSpecFRC12GUSIFileSpec # GUSIFileSpec::GUSIFileSpec(const GUSIFileSpec&)
CScratch__12GUSIFileSpecFb # GUSIFileSpec::CScratch(bool)
ReadHex__FPCciPc # ReadHex(const char*,int,char*)
+GUSIFSXGetVolInfo__FP31GUSIIOPBWrapper<12XVolumeParam> # GUSIFSXGetVolInfo(GUSIIOPBWrapper<XVolumeParam>*)
GUSIFSMoveRename
GUSIFSCatMove
GUSIFSCatMove__FPC6FSSpecl # GUSIFSCatMove(const FSSpec*,long)
@@ -1593,66 +1600,6 @@
open__14GUSINullDeviceFR13GUSIFileTokeni # GUSINullDevice::open(GUSIFileToken&,int)
Want__14GUSINullDeviceFR13GUSIFileToken # GUSINullDevice::Want(GUSIFileToken&)
GUSIwithNullSockets
-__vt__13GUSIScatterer # GUSIScatterer::__vt
-__vt__20GUSIOTDatagramSocket # GUSIOTDatagramSocket::__vt
-__vt__18GUSIOTStreamSocket # GUSIOTStreamSocket::__vt
-__vt__12GUSIOTSocket # GUSIOTSocket::__vt
-__vt__14GUSIOTStrategy # GUSIOTStrategy::__vt
-__vt__21GUSIOTDatagramFactory # GUSIOTDatagramFactory::__vt
-__vt__13GUSIOTFactory # GUSIOTFactory::__vt
-__vt__19GUSIOTStreamFactory # GUSIOTStreamFactory::__vt
-sOK__13GUSIOTFactory # GUSIOTFactory::sOK
-__dt__19GUSIOTStreamFactoryFv # GUSIOTStreamFactory::~GUSIOTStreamFactory()
-__dt__13GUSIOTFactoryFv # GUSIOTFactory::~GUSIOTFactory()
-__dt__21GUSIOTDatagramFactoryFv # GUSIOTDatagramFactory::~GUSIOTDatagramFactory()
-select__20GUSIOTDatagramSocketFPbPbPb # GUSIOTDatagramSocket::select(bool*,bool*,bool*)
-__dt__Q23std80auto_ptr<24GUSIOTAddr<9TUnitData,5>,Q23std35_Single<24GUSIOTAddr<9TUnitData,5>>>Fv # std::auto_ptr<GUSIOTAddr<TUnitData, 5>, std::_Single<GUSIOTAddr<TUnitData, 5>>>::~auto_ptr()
-sendto__20GUSIOTDatagramSocketFRC12GUSIGathereriPCvUi # GUSIOTDatagramSocket::sendto(const GUSIGatherer&,int,const void*,unsigned int)
-__dt__13GUSIScattererFv # GUSIScatterer::~GUSIScatterer()
-recvfrom__20GUSIOTDatagramSocketFRC13GUSIScattereriPvPUi # GUSIOTDatagramSocket::recvfrom(const GUSIScatterer&,int,void*,unsigned int*)
-connect__20GUSIOTDatagramSocketFPvUi # GUSIOTDatagramSocket::connect(void*,unsigned int)
-getpeername__20GUSIOTDatagramSocketFPvPUi # GUSIOTDatagramSocket::getpeername(void*,unsigned int*)
-BindIfUnbound__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::BindIfUnbound()
-__dt__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::~GUSIOTDatagramSocket()
-Clone__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::Clone()
-__ct__20GUSIOTDatagramSocketFP14GUSIOTStrategy # GUSIOTDatagramSocket::GUSIOTDatagramSocket(GUSIOTStrategy*)
-shutdown__18GUSIOTStreamSocketFi # GUSIOTStreamSocket::shutdown(int)
-select__18GUSIOTStreamSocketFPbPbPb # GUSIOTStreamSocket::select(bool*,bool*,bool*)
-sendto__18GUSIOTStreamSocketFRC12GUSIGathereriPCvUi # GUSIOTStreamSocket::sendto(const GUSIGatherer&,int,const void*,unsigned int)
-__dt__Q210GUSISocket17AddContextInScopeFv # GUSISocket::AddContextInScope::~AddContextInScope()
-recvfrom__18GUSIOTStreamSocketFRC13GUSIScattereriPvPUi # GUSIOTStreamSocket::recvfrom(const GUSIScatterer&,int,void*,unsigned int*)
-connect__18GUSIOTStreamSocketFPvUi # GUSIOTStreamSocket::connect(void*,unsigned int)
-accept__18GUSIOTStreamSocketFPvPUi # GUSIOTStreamSocket::accept(void*,unsigned int*)
-getpeername__18GUSIOTStreamSocketFPvPUi # GUSIOTStreamSocket::getpeername(void*,unsigned int*)
-listen__18GUSIOTStreamSocketFi # GUSIOTStreamSocket::listen(int)
-MopupEvents__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::MopupEvents()
-Close__18GUSIOTStreamSocketFUl # GUSIOTStreamSocket::Close(unsigned long)
-__dt__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::~GUSIOTStreamSocket()
-close__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::close()
-Clone__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::Clone()
-__ct__18GUSIOTStreamSocketFP14GUSIOTStrategy # GUSIOTStreamSocket::GUSIOTStreamSocket(GUSIOTStrategy*)
-Supports__12GUSIOTSocketFQ210GUSISocket12ConfigOption # GUSIOTSocket::Supports(GUSISocket::ConfigOption)
-setsockopt__12GUSIOTSocketFiiPvUi # GUSIOTSocket::setsockopt(int,int,void*,unsigned int)
-getsockopt__12GUSIOTSocketFiiPvPUi # GUSIOTSocket::getsockopt(int,int,void*,unsigned int*)
-ioctl__12GUSIOTSocketFUiPc # GUSIOTSocket::ioctl(unsigned int,char*)
-fcntl__12GUSIOTSocketFiPc # GUSIOTSocket::fcntl(int,char*)
-shutdown__12GUSIOTSocketFi # GUSIOTSocket::shutdown(int)
-getsockname__12GUSIOTSocketFPvPUi # GUSIOTSocket::getsockname(void*,unsigned int*)
-Unbind__12GUSIOTSocketFv # GUSIOTSocket::Unbind()
-BindToAddress__12GUSIOTSocketFP20GUSIOTAddr<5TBind,1> # GUSIOTSocket::BindToAddress(GUSIOTAddr<TBind, 1>*)
-bind__12GUSIOTSocketFPvUi # GUSIOTSocket::bind(void*,unsigned int)
-__dt__12GUSIOTSocketFv # GUSIOTSocket::~GUSIOTSocket()
-close__12GUSIOTSocketFv # GUSIOTSocket::close()
-__ct__12GUSIOTSocketFP14GUSIOTStrategy # GUSIOTSocket::GUSIOTSocket(GUSIOTStrategy*)
-__dt__Q212GUSIOTSocket4LockFv # GUSIOTSocket::Lock::~Lock()
-MopupEvents__12GUSIOTSocketFv # GUSIOTSocket::MopupEvents()
-CopyAddress__14GUSIOTStrategyFRC7TNetbufR7TNetbuf # GUSIOTStrategy::CopyAddress(const TNetbuf&,TNetbuf&)
-__dt__14GUSIOTStrategyFv # GUSIOTStrategy::~GUSIOTStrategy()
-CreateConfiguration__14GUSIOTStrategyFv # GUSIOTStrategy::CreateConfiguration()
-socket__21GUSIOTDatagramFactoryFiii # GUSIOTDatagramFactory::socket(int,int,int)
-socket__19GUSIOTStreamFactoryFiii # GUSIOTStreamFactory::socket(int,int,int)
-Initialize__13GUSIOTFactoryFv # GUSIOTFactory::Initialize()
-GUSIOTNotify
__vt__15GUSIOTUdpSocket # GUSIOTUdpSocket::__vt
__vt__17GUSIOTUdpStrategy # GUSIOTUdpStrategy::__vt
__vt__15GUSIOTTcpSocket # GUSIOTTcpSocket::__vt
@@ -1660,6 +1607,7 @@
__vt__18GUSIOTInetStrategy # GUSIOTInetStrategy::__vt
__vt__16GUSIOTUdpFactory # GUSIOTUdpFactory::__vt
__vt__16GUSIOTTcpFactory # GUSIOTTcpFactory::__vt
+__vt__13GUSIOTFactory # GUSIOTFactory::__vt
sInstance__16GUSIOTUdpFactory # GUSIOTUdpFactory::sInstance
sInstance__16GUSIOTTcpFactory # GUSIOTTcpFactory::sInstance
__dt__16GUSIOTTcpFactoryFv # GUSIOTTcpFactory::~GUSIOTTcpFactory()
@@ -1688,10 +1636,13 @@
PackAddress__18GUSIOTInetStrategyFPCvUiR7TNetbufb # GUSIOTInetStrategy::PackAddress(const void*,unsigned int,TNetbuf&,bool)
socket__16GUSIOTUdpFactoryFiii # GUSIOTUdpFactory::socket(int,int,int)
Strategy__16GUSIOTUdpFactoryFiii # GUSIOTUdpFactory::Strategy(int,int,int)
+__dt__21GUSIOTDatagramFactoryFv # GUSIOTDatagramFactory::~GUSIOTDatagramFactory()
Instance__16GUSIOTUdpFactoryFv # GUSIOTUdpFactory::Instance()
socket__16GUSIOTTcpFactoryFiii # GUSIOTTcpFactory::socket(int,int,int)
__dt__18GUSIOTInetStrategyFv # GUSIOTInetStrategy::~GUSIOTInetStrategy()
Strategy__16GUSIOTTcpFactoryFiii # GUSIOTTcpFactory::Strategy(int,int,int)
+__dt__13GUSIOTFactoryFv # GUSIOTFactory::~GUSIOTFactory()
+__dt__19GUSIOTStreamFactoryFv # GUSIOTStreamFactory::~GUSIOTStreamFactory()
Instance__16GUSIOTTcpFactoryFv # GUSIOTTcpFactory::Instance()
__vt__11GUSIOTNetDB # GUSIOTNetDB::__vt
__dt__11GUSIOTNetDBFv # GUSIOTNetDB::~GUSIOTNetDB()
@@ -1720,8 +1671,9 @@
socket__15GUSIPipeFactoryFiii # GUSIPipeFactory::socket(int,int,int)
GUSIwithLocalSockets
__vt__12GUSIGatherer # GUSIGatherer::__vt
+__vt__13GUSIScatterer # GUSIScatterer::__vt
get__40GUSISpecificData<Q23std2tm,&.GUSIKillTM>FP17GUSISpecificTable # GUSISpecificData<std::tm, &.GUSIKillTM>::get(GUSISpecificTable*)
-faccess__FPCcPUiPv # faccess(const char*,unsigned int*,void*)
+faccess
fsetfileinfo
fgetfileinfo
getservent
@@ -1804,6 +1756,7 @@
fcntl
__dt__12GUSIGathererFv # GUSIGatherer::~GUSIGatherer()
write
+__dt__13GUSIScattererFv # GUSIScatterer::~GUSIScatterer()
read
close
fsync
@@ -1833,10 +1786,10 @@
connect__13GUSIPPCSocketFPvUi # GUSIPPCSocket::connect(void*,unsigned int)
bind__13GUSIPPCSocketFPvUi # GUSIPPCSocket::bind(void*,unsigned int)
__ct__13GUSIPPCSocketFv # GUSIPPCSocket::GUSIPPCSocket()
-GUSIPPCDone__FP16PPCParamBlockRec # GUSIPPCDone(PPCParamBlockRec*)
-GUSIPPCListenDone__FP16PPCParamBlockRec # GUSIPPCListenDone(PPCParamBlockRec*)
-GUSIPPCRecvDone__FP16PPCParamBlockRec # GUSIPPCRecvDone(PPCParamBlockRec*)
-GUSIPPCSendDone__FP16PPCParamBlockRec # GUSIPPCSendDone(PPCParamBlockRec*)
+GUSIPPCDone
+GUSIPPCListenDone
+GUSIPPCRecvDone
+GUSIPPCSendDone
SetupListener__13GUSIPPCSocketFRQ213GUSIPPCSocket8Listener # GUSIPPCSocket::SetupListener(GUSIPPCSocket::Listener&)
socket__14GUSIPPCFactoryFiii # GUSIPPCFactory::socket(int,int,int)
GUSIwithPPCSockets
@@ -2003,6 +1956,61 @@
CantBlock__14GUSISigContextFv # GUSISigContext::CantBlock()
__dt__14GUSISigContextFv # GUSISigContext::~GUSISigContext()
__ct__14GUSISigContextFPC14GUSISigContext # GUSISigContext::GUSISigContext(const GUSISigContext*)
+__vt__20GUSIOTDatagramSocket # GUSIOTDatagramSocket::__vt
+__vt__18GUSIOTStreamSocket # GUSIOTStreamSocket::__vt
+__vt__12GUSIOTSocket # GUSIOTSocket::__vt
+__vt__14GUSIOTStrategy # GUSIOTStrategy::__vt
+__vt__21GUSIOTDatagramFactory # GUSIOTDatagramFactory::__vt
+__vt__19GUSIOTStreamFactory # GUSIOTStreamFactory::__vt
+sOK__13GUSIOTFactory # GUSIOTFactory::sOK
+select__20GUSIOTDatagramSocketFPbPbPb # GUSIOTDatagramSocket::select(bool*,bool*,bool*)
+__dt__Q23std80auto_ptr<24GUSIOTAddr<9TUnitData,5>,Q23std35_Single<24GUSIOTAddr<9TUnitData,5>>>Fv # std::auto_ptr<GUSIOTAddr<TUnitData, 5>, std::_Single<GUSIOTAddr<TUnitData, 5>>>::~auto_ptr()
+sendto__20GUSIOTDatagramSocketFRC12GUSIGathereriPCvUi # GUSIOTDatagramSocket::sendto(const GUSIGatherer&,int,const void*,unsigned int)
+recvfrom__20GUSIOTDatagramSocketFRC13GUSIScattereriPvPUi # GUSIOTDatagramSocket::recvfrom(const GUSIScatterer&,int,void*,unsigned int*)
+connect__20GUSIOTDatagramSocketFPvUi # GUSIOTDatagramSocket::connect(void*,unsigned int)
+getpeername__20GUSIOTDatagramSocketFPvPUi # GUSIOTDatagramSocket::getpeername(void*,unsigned int*)
+BindIfUnbound__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::BindIfUnbound()
+__dt__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::~GUSIOTDatagramSocket()
+Clone__20GUSIOTDatagramSocketFv # GUSIOTDatagramSocket::Clone()
+__ct__20GUSIOTDatagramSocketFP14GUSIOTStrategy # GUSIOTDatagramSocket::GUSIOTDatagramSocket(GUSIOTStrategy*)
+shutdown__18GUSIOTStreamSocketFi # GUSIOTStreamSocket::shutdown(int)
+select__18GUSIOTStreamSocketFPbPbPb # GUSIOTStreamSocket::select(bool*,bool*,bool*)
+sendto__18GUSIOTStreamSocketFRC12GUSIGathereriPCvUi # GUSIOTStreamSocket::sendto(const GUSIGatherer&,int,const void*,unsigned int)
+__dt__Q210GUSISocket17AddContextInScopeFv # GUSISocket::AddContextInScope::~AddContextInScope()
+recvfrom__18GUSIOTStreamSocketFRC13GUSIScattereriPvPUi # GUSIOTStreamSocket::recvfrom(const GUSIScatterer&,int,void*,unsigned int*)
+connect__18GUSIOTStreamSocketFPvUi # GUSIOTStreamSocket::connect(void*,unsigned int)
+accept__18GUSIOTStreamSocketFPvPUi # GUSIOTStreamSocket::accept(void*,unsigned int*)
+getpeername__18GUSIOTStreamSocketFPvPUi # GUSIOTStreamSocket::getpeername(void*,unsigned int*)
+listen__18GUSIOTStreamSocketFi # GUSIOTStreamSocket::listen(int)
+MopupEvents__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::MopupEvents()
+Close__18GUSIOTStreamSocketFUl # GUSIOTStreamSocket::Close(unsigned long)
+__dt__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::~GUSIOTStreamSocket()
+close__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::close()
+Clone__18GUSIOTStreamSocketFv # GUSIOTStreamSocket::Clone()
+__ct__18GUSIOTStreamSocketFP14GUSIOTStrategy # GUSIOTStreamSocket::GUSIOTStreamSocket(GUSIOTStrategy*)
+Supports__12GUSIOTSocketFQ210GUSISocket12ConfigOption # GUSIOTSocket::Supports(GUSISocket::ConfigOption)
+setsockopt__12GUSIOTSocketFiiPvUi # GUSIOTSocket::setsockopt(int,int,void*,unsigned int)
+getsockopt__12GUSIOTSocketFiiPvPUi # GUSIOTSocket::getsockopt(int,int,void*,unsigned int*)
+pre_select__12GUSIOTSocketFbbb # GUSIOTSocket::pre_select(bool,bool,bool)
+ioctl__12GUSIOTSocketFUiPc # GUSIOTSocket::ioctl(unsigned int,char*)
+fcntl__12GUSIOTSocketFiPc # GUSIOTSocket::fcntl(int,char*)
+shutdown__12GUSIOTSocketFi # GUSIOTSocket::shutdown(int)
+getsockname__12GUSIOTSocketFPvPUi # GUSIOTSocket::getsockname(void*,unsigned int*)
+Unbind__12GUSIOTSocketFv # GUSIOTSocket::Unbind()
+BindToAddress__12GUSIOTSocketFP20GUSIOTAddr<5TBind,1> # GUSIOTSocket::BindToAddress(GUSIOTAddr<TBind, 1>*)
+bind__12GUSIOTSocketFPvUi # GUSIOTSocket::bind(void*,unsigned int)
+__dt__12GUSIOTSocketFv # GUSIOTSocket::~GUSIOTSocket()
+close__12GUSIOTSocketFv # GUSIOTSocket::close()
+__ct__12GUSIOTSocketFP14GUSIOTStrategy # GUSIOTSocket::GUSIOTSocket(GUSIOTStrategy*)
+__dt__Q212GUSIOTSocket4LockFv # GUSIOTSocket::Lock::~Lock()
+MopupEvents__12GUSIOTSocketFv # GUSIOTSocket::MopupEvents()
+CopyAddress__14GUSIOTStrategyFRC7TNetbufR7TNetbuf # GUSIOTStrategy::CopyAddress(const TNetbuf&,TNetbuf&)
+__dt__14GUSIOTStrategyFv # GUSIOTStrategy::~GUSIOTStrategy()
+CreateConfiguration__14GUSIOTStrategyFv # GUSIOTStrategy::CreateConfiguration()
+socket__21GUSIOTDatagramFactoryFiii # GUSIOTDatagramFactory::socket(int,int,int)
+socket__19GUSIOTStreamFactoryFiii # GUSIOTStreamFactory::socket(int,int,int)
+Initialize__13GUSIOTFactoryFv # GUSIOTFactory::Initialize()
+GUSIOTNotify
atan
atan2
memmove
@@ -2106,6 +2114,7 @@
__throw_bad_alloc__3stdFv # std::__throw_bad_alloc()
__dt__Q23std9bad_allocFv # std::bad_alloc::~bad_alloc()
qd
+exit
__console_exit
__stdio_exit
__aborting
diff --git a/Mac/Build/PythonCore.mcp b/Mac/Build/PythonCore.mcp
index 9a0de20..611816a 100644
--- a/Mac/Build/PythonCore.mcp
+++ b/Mac/Build/PythonCore.mcp
Binary files differ
diff --git a/Mac/Build/PythonCoreCarbon.exp b/Mac/Build/PythonCoreCarbon.exp
index d748ebf..dfb08a4 100644
--- a/Mac/Build/PythonCoreCarbon.exp
+++ b/Mac/Build/PythonCoreCarbon.exp
@@ -313,6 +313,7 @@
PyNumber_Check
PyObject_AsWriteBuffer
PyObject_AsReadBuffer
+PyObject_CheckReadBuffer
PyObject_AsCharBuffer
PyObject_DelItem
PyObject_SetItem
@@ -1077,7 +1078,6 @@
GUSISetupConsoleStdio
GUSIStdioFlush
GUSIStdioClose
-_fdopen
__close_console
__close_file
__position_file
@@ -1146,6 +1146,7 @@
__vt__11GUSIContext # GUSIContext::__vt
sError__11GUSIContext # GUSIContext::sError
sHasThreading__11GUSIContext # GUSIContext::sHasThreading
+sCreatingCurrentContext__11GUSIContext # GUSIContext::sCreatingCurrentContext
sCurrentContext__11GUSIContext # GUSIContext::sCurrentContext
sContexts__11GUSIContext # GUSIContext::sContexts
sInstance__11GUSIProcess # GUSIProcess::sInstance
@@ -1154,9 +1155,9 @@
__dt__22GUSIThreadManagerProxyFv # GUSIThreadManagerProxy::~GUSIThreadManagerProxy()
__dt__Q23std76auto_ptr<22GUSIThreadManagerProxy,Q23std33_Single<22GUSIThreadManagerProxy>>Fv # std::auto_ptr<GUSIThreadManagerProxy, std::_Single<GUSIThreadManagerProxy>>::~auto_ptr()
Instance__22GUSIThreadManagerProxyFv # GUSIThreadManagerProxy::Instance()
-SetThreadTerminator__22GUSIThreadManagerProxyFUlPFUlPv_vPv # GUSIThreadManagerProxy::SetThreadTerminator(unsigned long,void (*)(unsigned long, void*),void*)
-SetThreadSwitcher__22GUSIThreadManagerProxyFUlPFUlPv_vPvUc # GUSIThreadManagerProxy::SetThreadSwitcher(unsigned long,void (*)(unsigned long, void*),void*,unsigned char)
-NewThread__22GUSIThreadManagerProxyFUlPFPv_PvPvlUlPPvPUl # GUSIThreadManagerProxy::NewThread(unsigned long,void* (*)(void*),void*,long,unsigned long,void**,unsigned long*)
+SetThreadTerminator__22GUSIThreadManagerProxyFUlP30OpaqueThreadTerminationProcPtrPv # GUSIThreadManagerProxy::SetThreadTerminator(unsigned long,OpaqueThreadTerminationProcPtr*,void*)
+SetThreadSwitcher__22GUSIThreadManagerProxyFUlP25OpaqueThreadSwitchProcPtrPvUc # GUSIThreadManagerProxy::SetThreadSwitcher(unsigned long,OpaqueThreadSwitchProcPtr*,void*,unsigned char)
+NewThread__22GUSIThreadManagerProxyFUlP24OpaqueThreadEntryProcPtrPvlUlPPvPUl # GUSIThreadManagerProxy::NewThread(unsigned long,OpaqueThreadEntryProcPtr*,void*,long,unsigned long,void**,unsigned long*)
GUSIControl__FP7IOParam # GUSIControl(IOParam*)
GUSIFinishIO__FP7IOParam # GUSIFinishIO(IOParam*)
GUSIStartIO__FP7IOParam # GUSIStartIO(IOParam*)
@@ -1171,18 +1172,19 @@
Terminate__11GUSIContextFv # GUSIContext::Terminate()
SwitchOut__11GUSIContextFv # GUSIContext::SwitchOut()
SwitchIn__11GUSIContextFv # GUSIContext::SwitchIn()
-SetTerminator__11GUSIContextFPFUlPv_vPv # GUSIContext::SetTerminator(void (*)(unsigned long, void*),void*)
+SetTerminator__11GUSIContextFP30OpaqueThreadTerminationProcPtrPv # GUSIContext::SetTerminator(OpaqueThreadTerminationProcPtr*,void*)
GUSISetThreadTerminator
-SetSwitchOut__11GUSIContextFPFUlPv_vPv # GUSIContext::SetSwitchOut(void (*)(unsigned long, void*),void*)
-SetSwitchIn__11GUSIContextFPFUlPv_vPv # GUSIContext::SetSwitchIn(void (*)(unsigned long, void*),void*)
+SetSwitchOut__11GUSIContextFP25OpaqueThreadSwitchProcPtrPv # GUSIContext::SetSwitchOut(OpaqueThreadSwitchProcPtr*,void*)
+SetSwitchIn__11GUSIContextFP25OpaqueThreadSwitchProcPtrPv # GUSIContext::SetSwitchIn(OpaqueThreadSwitchProcPtr*,void*)
GUSISetThreadSwitcher
CreateContext__18GUSIContextFactoryFUl # GUSIContextFactory::CreateContext(unsigned long)
-CreateContext__18GUSIContextFactoryFPFPv_PvPvlUlPPvPUl # GUSIContextFactory::CreateContext(void* (*)(void*),void*,long,unsigned long,void**,unsigned long*)
+CreateContext__18GUSIContextFactoryFP24OpaqueThreadEntryProcPtrPvlUlPPvPUl # GUSIContextFactory::CreateContext(OpaqueThreadEntryProcPtr*,void*,long,unsigned long,void**,unsigned long*)
__dt__18GUSIContextFactoryFv # GUSIContextFactory::~GUSIContextFactory()
__ct__18GUSIContextFactoryFv # GUSIContextFactory::GUSIContextFactory()
-__dt__Q23std68auto_ptr<18GUSIContextFactory,Q23std29_Single<18GUSIContextFactory>>Fv # std::auto_ptr<GUSIContextFactory, std::_Single<GUSIContextFactory>>::~auto_ptr()
+DeleteInstance__18GUSIContextFactoryFv # GUSIContextFactory::DeleteInstance()
SetInstance__18GUSIContextFactoryFP18GUSIContextFactory # GUSIContextFactory::SetInstance(GUSIContextFactory*)
Instance__18GUSIContextFactoryFv # GUSIContextFactory::Instance()
+GUSISetupContextFactory
GUSINewThread
Wakeup__11GUSIProcessFv # GUSIProcess::Wakeup()
Wakeup__11GUSIContextFv # GUSIContext::Wakeup()
@@ -1190,7 +1192,7 @@
LiquidateAll__Q211GUSIContext5QueueFv # GUSIContext::Queue::LiquidateAll()
__dt__11GUSIContextFv # GUSIContext::~GUSIContext()
Lookup__11GUSIContextFUl # GUSIContext::Lookup(unsigned long)
-__ct__11GUSIContextFPFPv_PvPvlUlPPvPUl # GUSIContext::GUSIContext(void* (*)(void*),void*,long,unsigned long,void**,unsigned long*)
+__ct__11GUSIContextFP24OpaqueThreadEntryProcPtrPvlUlPPvPUl # GUSIContext::GUSIContext(OpaqueThreadEntryProcPtr*,void*,long,unsigned long,void**,unsigned long*)
__ct__11GUSIContextFUl # GUSIContext::GUSIContext(unsigned long)
FinishSetup__11GUSIContextFv # GUSIContext::FinishSetup()
GUSIThreadTerminator
@@ -1231,6 +1233,9 @@
CloseAllDescriptors__19GUSIDescriptorTableFv # GUSIDescriptorTable::CloseAllDescriptors()
SetInstance__19GUSIDescriptorTableFP19GUSIDescriptorTable # GUSIDescriptorTable::SetInstance(GUSIDescriptorTable*)
Instance__19GUSIDescriptorTableFv # GUSIDescriptorTable::Instance()
+GUSISetupDescriptorTable
+__ct__10GUSIDeviceFv # GUSIDevice::GUSIDevice()
+__ct__14GUSINullDeviceFv # GUSINullDevice::GUSINullDevice()
Instance__14GUSINullDeviceFv # GUSINullDevice::Instance()
GUSIDefaultSetupConsole
GUSISetupConsole
@@ -1360,6 +1365,7 @@
__ct__12GUSIFileSpecFRC12GUSIFileSpec # GUSIFileSpec::GUSIFileSpec(const GUSIFileSpec&)
CScratch__12GUSIFileSpecFb # GUSIFileSpec::CScratch(bool)
ReadHex__FPCciPc # ReadHex(const char*,int,char*)
+GUSIFSXGetVolInfo__FP31GUSIIOPBWrapper<12XVolumeParam> # GUSIFSXGetVolInfo(GUSIIOPBWrapper<XVolumeParam>*)
GUSIFSMoveRename
GUSIFSCatMove
GUSIFSCatMove__FPC6FSSpecl # GUSIFSCatMove(const FSSpec*,long)
@@ -1521,7 +1527,7 @@
__vt__12GUSIGatherer # GUSIGatherer::__vt
__vt__13GUSIScatterer # GUSIScatterer::__vt
get__40GUSISpecificData<Q23std2tm,&.GUSIKillTM>FP17GUSISpecificTable # GUSISpecificData<std::tm, &.GUSIKillTM>::get(GUSISpecificTable*)
-faccess__FPCcPUiPv # faccess(const char*,unsigned int*,void*)
+faccess
fsetfileinfo
fgetfileinfo
getservent
@@ -1811,6 +1817,7 @@
Supports__12GUSIOTSocketFQ210GUSISocket12ConfigOption # GUSIOTSocket::Supports(GUSISocket::ConfigOption)
setsockopt__12GUSIOTSocketFiiPvUi # GUSIOTSocket::setsockopt(int,int,void*,unsigned int)
getsockopt__12GUSIOTSocketFiiPvPUi # GUSIOTSocket::getsockopt(int,int,void*,unsigned int*)
+pre_select__12GUSIOTSocketFbbb # GUSIOTSocket::pre_select(bool,bool,bool)
ioctl__12GUSIOTSocketFUiPc # GUSIOTSocket::ioctl(unsigned int,char*)
fcntl__12GUSIOTSocketFiPc # GUSIOTSocket::fcntl(int,char*)
shutdown__12GUSIOTSocketFi # GUSIOTSocket::shutdown(int)
@@ -2223,6 +2230,7 @@
_ftype
_fcreator
_chmod
+_fdopen
__gettype
__getcreator
__ctopstring
diff --git a/Mac/Build/PythonStandSmall.mcp b/Mac/Build/PythonStandSmall.mcp
index 92231b8..f0385d7 100644
--- a/Mac/Build/PythonStandSmall.mcp
+++ b/Mac/Build/PythonStandSmall.mcp
Binary files differ
diff --git a/Mac/Build/_dummy_tkinter.mcp b/Mac/Build/_dummy_tkinter.mcp
index 5e25f60..92c8f5b 100644
--- a/Mac/Build/_dummy_tkinter.mcp
+++ b/Mac/Build/_dummy_tkinter.mcp
Binary files differ
diff --git "a/Mac/Distributions/\050vise\051/Python 2.2.vct" "b/Mac/Distributions/\050vise\051/Python 2.2.vct"
index e963aee..2576f38 100644
--- "a/Mac/Distributions/\050vise\051/Python 2.2.vct"
+++ "b/Mac/Distributions/\050vise\051/Python 2.2.vct"
Binary files differ
diff --git a/Mac/Distributions/dev.exclude b/Mac/Distributions/dev.exclude
index 401509c..2babfd6 100644
--- a/Mac/Distributions/dev.exclude
+++ b/Mac/Distributions/dev.exclude
@@ -6,6 +6,7 @@
*.hqx
*.idb
*.pyc
+*.pyo
*.slb
*.xMAP
*.xSYM
@@ -16,4 +17,3 @@
@*
CVS
[(]*[)]
-*.pyo
diff --git a/Mac/Distributions/dev.include b/Mac/Distributions/dev.include
index a7a965c..65e1fbb 100644
--- a/Mac/Distributions/dev.include
+++ b/Mac/Distributions/dev.include
@@ -223,6 +223,12 @@
(':Mac:Build:_Win.mcp.xml', None)
(':Mac:Build:_dummy_tkinter.mcp', None)
(':Mac:Build:_dummy_tkinter.mcp.exp', None)
+(':Mac:Build:_hotshot.carbon.mcp', None)
+(':Mac:Build:_hotshot.carbon.mcp.exp', None)
+(':Mac:Build:_hotshot.carbon.mcp.xml', None)
+(':Mac:Build:_hotshot.mcp', None)
+(':Mac:Build:_hotshot.mcp.exp', None)
+(':Mac:Build:_hotshot.mcp.xml', None)
(':Mac:Build:_symtable.carbon.mcp', None)
(':Mac:Build:_symtable.carbon.mcp.exp', None)
(':Mac:Build:_symtable.carbon.mcp.xml', None)
@@ -423,6 +429,7 @@
(':Modules:_codecsmodule.c', None)
(':Modules:_curses_panel.c', None)
(':Modules:_cursesmodule.c', None)
+(':Modules:_hotshot.c', None)
(':Modules:_localemodule.c', None)
(':Modules:_sre.c', None)
(':Modules:_testcapimodule.c', None)
@@ -589,10 +596,7 @@
(':readmefiles', None)
(':setup.py', None)
(':site-packages', None)
-(':Mac:Build:_hotshot.mcp.xml', None)
-(':Mac:Build:_hotshot.mcp.exp', None)
-(':Mac:Build:_hotshot.mcp', None)
-(':Mac:Build:_hotshot.carbon.mcp.xml', None)
-(':Mac:Build:_hotshot.carbon.mcp.exp', None)
-(':Mac:Build:_hotshot.carbon.mcp', None)
-(':Modules:_hotshot.c', None)
+(':Mac:Build:hfsplus.carbon.mcp.xml', None)
+(':Mac:Build:hfsplus.carbon.mcp.exp', None)
+(':Mac:Build:hfsplus.carbon.mcp', None)
+(':Mac:mwerks:mwerks_shlib_config.h', '')
diff --git a/Mac/Include/macbuildno.h b/Mac/Include/macbuildno.h
index a50800d..6eda004 100644
--- a/Mac/Include/macbuildno.h
+++ b/Mac/Include/macbuildno.h
@@ -1 +1 @@
-#define BUILD 111
+#define BUILD 116
diff --git a/Mac/Lib/mkcwproject/__init__.py b/Mac/Lib/mkcwproject/__init__.py
index da73adb..9c5e21c 100644
--- a/Mac/Lib/mkcwproject/__init__.py
+++ b/Mac/Lib/mkcwproject/__init__.py
@@ -18,6 +18,10 @@
dictcopy['mac_exportname'] = os.path.split(outputfile)[1] + '.exp'
if not dictcopy.has_key('mac_outputdir'):
dictcopy['mac_outputdir'] = ':lib:'
+ if not dictcopy.has_key('stdlibraryflags'):
+ dictcopy['stdlibraryflags'] = 'Debug'
+ if not dictcopy.has_key('libraryflags'):
+ dictcopy['libraryflags'] = 'Debug'
if not dictcopy.has_key('mac_dllname'):
dictcopy['mac_dllname'] = modulename + '.ppc.slb'
if not dictcopy.has_key('mac_targetname'):
diff --git a/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml b/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml
index 27f3cb1..1b10dbb 100644
--- a/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml
+++ b/Mac/Lib/mkcwproject/template-carbon/template-alllibraries.xml
@@ -3,5 +3,5 @@
<PATH>%(libraries)s</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
+ <FILEFLAGS>%(libraryflags)s</FILEFLAGS>
</FILE>
diff --git a/Mac/Lib/mkcwproject/template-carbon/template.prj.xml b/Mac/Lib/mkcwproject/template-carbon/template.prj.xml
index 7bd07e6..5702c2f 100644
--- a/Mac/Lib/mkcwproject/template-carbon/template.prj.xml
+++ b/Mac/Lib/mkcwproject/template-carbon/template.prj.xml
@@ -101,7 +101,7 @@
<SETTING><NAME>SystemSearchPaths</NAME>
<SETTING>
<SETTING><NAME>SearchPath</NAME>
- <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s:GUSI2Carbon:include:</VALUE></SETTING>
+ <SETTING><NAME>Path</NAME><VALUE>%(sysprefix)s:GUSI2:include:</VALUE></SETTING>
<SETTING><NAME>PathFormat</NAME><VALUE>MacOS</VALUE></SETTING>
<SETTING><NAME>PathRoot</NAME><VALUE>%(mac_sysprefixtype)s</VALUE></SETTING>
</SETTING>
@@ -977,17 +977,10 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.Carbon.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS></FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>CarbonLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
- <FILEFLAGS></FILEFLAGS>
+ <FILEFLAGS>%(stdlibraryflags)s</FILEFLAGS>
</FILE>
</FILELIST>
<LINKORDER>
@@ -1013,11 +1006,6 @@
<PATH>PythonCoreCarbon</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.Carbon.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
</LINKORDER>
</TARGET>
</TARGETLIST>
@@ -1053,12 +1041,6 @@
<FILEREF>
<TARGETNAME>%(mac_targetname)s</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.Carbon.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <TARGETNAME>%(mac_targetname)s</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
<PATH>CarbonLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
diff --git a/Mac/Lib/mkcwproject/template-ppc/template-alllibraries.xml b/Mac/Lib/mkcwproject/template-ppc/template-alllibraries.xml
index 27f3cb1..1b10dbb 100644
--- a/Mac/Lib/mkcwproject/template-ppc/template-alllibraries.xml
+++ b/Mac/Lib/mkcwproject/template-ppc/template-alllibraries.xml
@@ -3,5 +3,5 @@
<PATH>%(libraries)s</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
+ <FILEFLAGS>%(libraryflags)s</FILEFLAGS>
</FILE>
diff --git a/Mac/Lib/mkcwproject/template-ppc/template.prj.xml b/Mac/Lib/mkcwproject/template-ppc/template.prj.xml
index b64d770..3bd6f24 100644
--- a/Mac/Lib/mkcwproject/template-ppc/template.prj.xml
+++ b/Mac/Lib/mkcwproject/template-ppc/template.prj.xml
@@ -712,13 +712,6 @@
</FILE>
<FILE>
<PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.PPC.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- <FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
- </FILE>
- <FILE>
- <PATHTYPE>Name</PATHTYPE>
<PATH>MathLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
@@ -729,7 +722,7 @@
<PATH>InterfaceLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
<FILEKIND>Library</FILEKIND>
- <FILEFLAGS>Debug</FILEFLAGS>
+ <FILEFLAGS>%(stdlibraryflags)s</FILEFLAGS>
</FILE>
</FILELIST>
<LINKORDER>
@@ -752,11 +745,6 @@
</FILEREF>
<FILEREF>
<PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.PPC.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <PATHTYPE>Name</PATHTYPE>
<PATH>MathLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
@@ -800,12 +788,6 @@
<FILEREF>
<TARGETNAME>%(mac_targetname)s</TARGETNAME>
<PATHTYPE>Name</PATHTYPE>
- <PATH>MSL C.PPC.Lib</PATH>
- <PATHFORMAT>MacOS</PATHFORMAT>
- </FILEREF>
- <FILEREF>
- <TARGETNAME>%(mac_targetname)s</TARGETNAME>
- <PATHTYPE>Name</PATHTYPE>
<PATH>MathLib</PATH>
<PATHFORMAT>MacOS</PATHFORMAT>
</FILEREF>
diff --git a/Mac/Modules/ae/_AEmodule.c b/Mac/Modules/ae/_AEmodule.c
index b6e3c48..537388e 100644
--- a/Mac/Modules/ae/_AEmodule.c
+++ b/Mac/Modules/ae/_AEmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -784,7 +780,7 @@
#define AEDesc_hash NULL
PyTypeObject AEDesc_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"AEDesc", /*tp_name*/
sizeof(AEDescObject), /*tp_basicsize*/
diff --git a/Mac/Modules/app/_Appmodule.c b/Mac/Modules/app/_Appmodule.c
index b672db0..b70feda 100644
--- a/Mac/Modules/app/_Appmodule.c
+++ b/Mac/Modules/app/_Appmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
diff --git a/Mac/Modules/cf/_CFmodule.c b/Mac/Modules/cf/_CFmodule.c
index fc2bb52..fbdabbb 100644
--- a/Mac/Modules/cf/_CFmodule.c
+++ b/Mac/Modules/cf/_CFmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -170,7 +166,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFGetTypeID
PyMac_PRECHECK(CFGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFGetTypeID(_self->ob_itself);
@@ -183,7 +181,9 @@
{
PyObject *_res = NULL;
CFTypeRef _rv;
+#ifndef CFRetain
PyMac_PRECHECK(CFRetain);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFRetain(_self->ob_itself);
@@ -195,7 +195,9 @@
static PyObject *CFTypeRefObj_CFRelease(CFTypeRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFRelease
PyMac_PRECHECK(CFRelease);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFRelease(_self->ob_itself);
@@ -208,7 +210,9 @@
{
PyObject *_res = NULL;
CFIndex _rv;
+#ifndef CFGetRetainCount
PyMac_PRECHECK(CFGetRetainCount);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFGetRetainCount(_self->ob_itself);
@@ -222,7 +226,9 @@
PyObject *_res = NULL;
Boolean _rv;
CFTypeRef cf2;
+#ifndef CFEqual
PyMac_PRECHECK(CFEqual);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFTypeRefObj_Convert, &cf2))
return NULL;
@@ -237,7 +243,9 @@
{
PyObject *_res = NULL;
CFHashCode _rv;
+#ifndef CFHash
PyMac_PRECHECK(CFHash);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFHash(_self->ob_itself);
@@ -250,7 +258,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFCopyDescription
PyMac_PRECHECK(CFCopyDescription);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFCopyDescription(_self->ob_itself);
@@ -262,7 +272,9 @@
static PyObject *CFTypeRefObj_CFShow(CFTypeRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFShow
PyMac_PRECHECK(CFShow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFShow(_self->ob_itself);
@@ -322,7 +334,7 @@
}
PyTypeObject CFTypeRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFTypeRef", /*tp_name*/
sizeof(CFTypeRefObject), /*tp_basicsize*/
@@ -406,7 +418,9 @@
{
PyObject *_res = NULL;
CFIndex _rv;
+#ifndef CFArrayGetCount
PyMac_PRECHECK(CFArrayGetCount);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFArrayGetCount(_self->ob_itself);
@@ -472,7 +486,7 @@
}
PyTypeObject CFArrayRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFArrayRef", /*tp_name*/
sizeof(CFArrayRefObject), /*tp_basicsize*/
@@ -543,7 +557,9 @@
{
PyObject *_res = NULL;
CFIndex idx;
+#ifndef CFArrayRemoveValueAtIndex
PyMac_PRECHECK(CFArrayRemoveValueAtIndex);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&idx))
return NULL;
@@ -557,7 +573,9 @@
static PyObject *CFMutableArrayRefObj_CFArrayRemoveAllValues(CFMutableArrayRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFArrayRemoveAllValues
PyMac_PRECHECK(CFArrayRemoveAllValues);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFArrayRemoveAllValues(_self->ob_itself);
@@ -571,7 +589,9 @@
PyObject *_res = NULL;
CFIndex idx1;
CFIndex idx2;
+#ifndef CFArrayExchangeValuesAtIndices
PyMac_PRECHECK(CFArrayExchangeValuesAtIndices);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&idx1,
&idx2))
@@ -625,7 +645,7 @@
}
PyTypeObject CFMutableArrayRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFMutableArrayRef", /*tp_name*/
sizeof(CFMutableArrayRefObject), /*tp_basicsize*/
@@ -709,7 +729,9 @@
{
PyObject *_res = NULL;
CFIndex _rv;
+#ifndef CFDictionaryGetCount
PyMac_PRECHECK(CFDictionaryGetCount);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFDictionaryGetCount(_self->ob_itself);
@@ -757,7 +779,7 @@
}
PyTypeObject CFDictionaryRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFDictionaryRef", /*tp_name*/
sizeof(CFDictionaryRefObject), /*tp_basicsize*/
@@ -827,7 +849,9 @@
static PyObject *CFMutableDictionaryRefObj_CFDictionaryRemoveAllValues(CFMutableDictionaryRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFDictionaryRemoveAllValues
PyMac_PRECHECK(CFDictionaryRemoveAllValues);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFDictionaryRemoveAllValues(_self->ob_itself);
@@ -873,7 +897,7 @@
}
PyTypeObject CFMutableDictionaryRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFMutableDictionaryRef", /*tp_name*/
sizeof(CFMutableDictionaryRefObject), /*tp_basicsize*/
@@ -957,7 +981,9 @@
{
PyObject *_res = NULL;
CFIndex _rv;
+#ifndef CFDataGetLength
PyMac_PRECHECK(CFDataGetLength);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFDataGetLength(_self->ob_itself);
@@ -1023,7 +1049,7 @@
}
PyTypeObject CFDataRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFDataRef", /*tp_name*/
sizeof(CFDataRefObject), /*tp_basicsize*/
@@ -1094,7 +1120,9 @@
{
PyObject *_res = NULL;
CFIndex length;
+#ifndef CFDataSetLength
PyMac_PRECHECK(CFDataSetLength);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&length))
return NULL;
@@ -1109,7 +1137,9 @@
{
PyObject *_res = NULL;
CFIndex extraLength;
+#ifndef CFDataIncreaseLength
PyMac_PRECHECK(CFDataIncreaseLength);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&extraLength))
return NULL;
@@ -1126,7 +1156,9 @@
unsigned char *bytes__in__;
long bytes__len__;
int bytes__in_len__;
+#ifndef CFDataAppendBytes
PyMac_PRECHECK(CFDataAppendBytes);
+#endif
if (!PyArg_ParseTuple(_args, "s#",
&bytes__in__, &bytes__in_len__))
return NULL;
@@ -1145,7 +1177,9 @@
unsigned char *newBytes__in__;
long newBytes__len__;
int newBytes__in_len__;
+#ifndef CFDataReplaceBytes
PyMac_PRECHECK(CFDataReplaceBytes);
+#endif
if (!PyArg_ParseTuple(_args, "O&s#",
CFRange_Convert, &range,
&newBytes__in__, &newBytes__in_len__))
@@ -1163,7 +1197,9 @@
{
PyObject *_res = NULL;
CFRange range;
+#ifndef CFDataDeleteBytes
PyMac_PRECHECK(CFDataDeleteBytes);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFRange_Convert, &range))
return NULL;
@@ -1219,7 +1255,7 @@
}
PyTypeObject CFMutableDataRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFMutableDataRef", /*tp_name*/
sizeof(CFMutableDataRefObject), /*tp_basicsize*/
@@ -1332,7 +1368,9 @@
{
PyObject *_res = NULL;
CFIndex _rv;
+#ifndef CFStringGetLength
PyMac_PRECHECK(CFStringGetLength);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetLength(_self->ob_itself);
@@ -1352,7 +1390,9 @@
UInt8 buffer;
CFIndex maxBufLen;
CFIndex usedBufLen;
+#ifndef CFStringGetBytes
PyMac_PRECHECK(CFStringGetBytes);
+#endif
if (!PyArg_ParseTuple(_args, "O&lbll",
CFRange_Convert, &range,
&encoding,
@@ -1398,7 +1438,9 @@
{
PyObject *_res = NULL;
CFStringEncoding _rv;
+#ifndef CFStringGetSmallestEncoding
PyMac_PRECHECK(CFStringGetSmallestEncoding);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetSmallestEncoding(_self->ob_itself);
@@ -1411,7 +1453,9 @@
{
PyObject *_res = NULL;
CFStringEncoding _rv;
+#ifndef CFStringGetFastestEncoding
PyMac_PRECHECK(CFStringGetFastestEncoding);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetFastestEncoding(_self->ob_itself);
@@ -1427,7 +1471,9 @@
CFStringRef string2;
CFRange rangeToCompare;
CFOptionFlags compareOptions;
+#ifndef CFStringCompareWithOptions
PyMac_PRECHECK(CFStringCompareWithOptions);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&l",
CFStringRefObj_Convert, &string2,
CFRange_Convert, &rangeToCompare,
@@ -1448,7 +1494,9 @@
CFComparisonResult _rv;
CFStringRef string2;
CFOptionFlags compareOptions;
+#ifndef CFStringCompare
PyMac_PRECHECK(CFStringCompare);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
CFStringRefObj_Convert, &string2,
&compareOptions))
@@ -1469,7 +1517,9 @@
CFRange rangeToSearch;
CFOptionFlags searchOptions;
CFRange result;
+#ifndef CFStringFindWithOptions
PyMac_PRECHECK(CFStringFindWithOptions);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&l",
CFStringRefObj_Convert, &stringToFind,
CFRange_Convert, &rangeToSearch,
@@ -1514,7 +1564,9 @@
CFRange _rv;
CFStringRef stringToFind;
CFOptionFlags compareOptions;
+#ifndef CFStringFind
PyMac_PRECHECK(CFStringFind);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
CFStringRefObj_Convert, &stringToFind,
&compareOptions))
@@ -1532,7 +1584,9 @@
PyObject *_res = NULL;
Boolean _rv;
CFStringRef prefix;
+#ifndef CFStringHasPrefix
PyMac_PRECHECK(CFStringHasPrefix);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &prefix))
return NULL;
@@ -1548,7 +1602,9 @@
PyObject *_res = NULL;
Boolean _rv;
CFStringRef suffix;
+#ifndef CFStringHasSuffix
PyMac_PRECHECK(CFStringHasSuffix);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &suffix))
return NULL;
@@ -1566,7 +1622,9 @@
CFIndex lineBeginIndex;
CFIndex lineEndIndex;
CFIndex contentsEndIndex;
+#ifndef CFStringGetLineBounds
PyMac_PRECHECK(CFStringGetLineBounds);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFRange_Convert, &range))
return NULL;
@@ -1602,7 +1660,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef CFStringGetIntValue
PyMac_PRECHECK(CFStringGetIntValue);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetIntValue(_self->ob_itself);
@@ -1615,7 +1675,9 @@
{
PyObject *_res = NULL;
double _rv;
+#ifndef CFStringGetDoubleValue
PyMac_PRECHECK(CFStringGetDoubleValue);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetDoubleValue(_self->ob_itself);
@@ -1628,7 +1690,9 @@
{
PyObject *_res = NULL;
CFStringEncoding _rv;
+#ifndef CFStringConvertIANACharSetNameToEncoding
PyMac_PRECHECK(CFStringConvertIANACharSetNameToEncoding);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringConvertIANACharSetNameToEncoding(_self->ob_itself);
@@ -1640,7 +1704,9 @@
static PyObject *CFStringRefObj_CFShowStr(CFStringRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFShowStr
PyMac_PRECHECK(CFShowStr);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFShowStr(_self->ob_itself);
@@ -1822,7 +1888,7 @@
}
PyTypeObject CFStringRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFStringRef", /*tp_name*/
sizeof(CFStringRefObject), /*tp_basicsize*/
@@ -1893,7 +1959,9 @@
{
PyObject *_res = NULL;
CFStringRef appendedString;
+#ifndef CFStringAppend
PyMac_PRECHECK(CFStringAppend);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &appendedString))
return NULL;
@@ -1909,7 +1977,9 @@
PyObject *_res = NULL;
StringPtr pStr;
CFStringEncoding encoding;
+#ifndef CFStringAppendPascalString
PyMac_PRECHECK(CFStringAppendPascalString);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetStr255, &pStr,
&encoding))
@@ -1927,7 +1997,9 @@
PyObject *_res = NULL;
char* cStr;
CFStringEncoding encoding;
+#ifndef CFStringAppendCString
PyMac_PRECHECK(CFStringAppendCString);
+#endif
if (!PyArg_ParseTuple(_args, "sl",
&cStr,
&encoding))
@@ -1945,7 +2017,9 @@
PyObject *_res = NULL;
CFIndex idx;
CFStringRef insertedStr;
+#ifndef CFStringInsert
PyMac_PRECHECK(CFStringInsert);
+#endif
if (!PyArg_ParseTuple(_args, "lO&",
&idx,
CFStringRefObj_Convert, &insertedStr))
@@ -1962,7 +2036,9 @@
{
PyObject *_res = NULL;
CFRange range;
+#ifndef CFStringDelete
PyMac_PRECHECK(CFStringDelete);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFRange_Convert, &range))
return NULL;
@@ -1978,7 +2054,9 @@
PyObject *_res = NULL;
CFRange range;
CFStringRef replacement;
+#ifndef CFStringReplace
PyMac_PRECHECK(CFStringReplace);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
CFRange_Convert, &range,
CFStringRefObj_Convert, &replacement))
@@ -1995,7 +2073,9 @@
{
PyObject *_res = NULL;
CFStringRef replacement;
+#ifndef CFStringReplaceAll
PyMac_PRECHECK(CFStringReplaceAll);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &replacement))
return NULL;
@@ -2012,7 +2092,9 @@
CFStringRef padString;
CFIndex length;
CFIndex indexIntoPad;
+#ifndef CFStringPad
PyMac_PRECHECK(CFStringPad);
+#endif
if (!PyArg_ParseTuple(_args, "O&ll",
CFStringRefObj_Convert, &padString,
&length,
@@ -2031,7 +2113,9 @@
{
PyObject *_res = NULL;
CFStringRef trimString;
+#ifndef CFStringTrim
PyMac_PRECHECK(CFStringTrim);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &trimString))
return NULL;
@@ -2045,7 +2129,9 @@
static PyObject *CFMutableStringRefObj_CFStringTrimWhitespace(CFMutableStringRefObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CFStringTrimWhitespace
PyMac_PRECHECK(CFStringTrimWhitespace);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CFStringTrimWhitespace(_self->ob_itself);
@@ -2109,7 +2195,7 @@
}
PyTypeObject CFMutableStringRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFMutableStringRef", /*tp_name*/
sizeof(CFMutableStringRefObject), /*tp_basicsize*/
@@ -2199,7 +2285,9 @@
{
PyObject *_res = NULL;
CFURLRef _rv;
+#ifndef CFURLCopyAbsoluteURL
PyMac_PRECHECK(CFURLCopyAbsoluteURL);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyAbsoluteURL(_self->ob_itself);
@@ -2212,7 +2300,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLGetString
PyMac_PRECHECK(CFURLGetString);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLGetString(_self->ob_itself);
@@ -2225,7 +2315,9 @@
{
PyObject *_res = NULL;
CFURLRef _rv;
+#ifndef CFURLGetBaseURL
PyMac_PRECHECK(CFURLGetBaseURL);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLGetBaseURL(_self->ob_itself);
@@ -2238,7 +2330,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef CFURLCanBeDecomposed
PyMac_PRECHECK(CFURLCanBeDecomposed);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCanBeDecomposed(_self->ob_itself);
@@ -2251,7 +2345,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyScheme
PyMac_PRECHECK(CFURLCopyScheme);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyScheme(_self->ob_itself);
@@ -2264,7 +2360,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyNetLocation
PyMac_PRECHECK(CFURLCopyNetLocation);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyNetLocation(_self->ob_itself);
@@ -2277,7 +2375,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyPath
PyMac_PRECHECK(CFURLCopyPath);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyPath(_self->ob_itself);
@@ -2290,7 +2390,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef CFURLHasDirectoryPath
PyMac_PRECHECK(CFURLHasDirectoryPath);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLHasDirectoryPath(_self->ob_itself);
@@ -2303,7 +2405,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyResourceSpecifier
PyMac_PRECHECK(CFURLCopyResourceSpecifier);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyResourceSpecifier(_self->ob_itself);
@@ -2316,7 +2420,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyHostName
PyMac_PRECHECK(CFURLCopyHostName);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyHostName(_self->ob_itself);
@@ -2329,7 +2435,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef CFURLGetPortNumber
PyMac_PRECHECK(CFURLGetPortNumber);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLGetPortNumber(_self->ob_itself);
@@ -2342,7 +2450,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyUserName
PyMac_PRECHECK(CFURLCopyUserName);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyUserName(_self->ob_itself);
@@ -2355,7 +2465,9 @@
{
PyObject *_res = NULL;
CFStringRef _rv;
+#ifndef CFURLCopyPassword
PyMac_PRECHECK(CFURLCopyPassword);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLCopyPassword(_self->ob_itself);
@@ -2369,7 +2481,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFStringRef charactersToLeaveEscaped;
+#ifndef CFURLCopyParameterString
PyMac_PRECHECK(CFURLCopyParameterString);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &charactersToLeaveEscaped))
return NULL;
@@ -2385,7 +2499,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFStringRef charactersToLeaveEscaped;
+#ifndef CFURLCopyQueryString
PyMac_PRECHECK(CFURLCopyQueryString);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &charactersToLeaveEscaped))
return NULL;
@@ -2401,7 +2517,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFStringRef charactersToLeaveEscaped;
+#ifndef CFURLCopyFragment
PyMac_PRECHECK(CFURLCopyFragment);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CFStringRefObj_Convert, &charactersToLeaveEscaped))
return NULL;
@@ -2481,7 +2599,7 @@
}
PyTypeObject CFURLRef_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"CFURLRef", /*tp_name*/
sizeof(CFURLRefObject), /*tp_basicsize*/
@@ -2506,7 +2624,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFAllocatorGetTypeID
PyMac_PRECHECK(CFAllocatorGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFAllocatorGetTypeID();
@@ -2521,7 +2641,9 @@
CFIndex _rv;
CFIndex size;
CFOptionFlags hint;
+#ifndef CFAllocatorGetPreferredSizeForSize
PyMac_PRECHECK(CFAllocatorGetPreferredSizeForSize);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&size,
&hint))
@@ -2539,7 +2661,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFTypeID theType;
+#ifndef CFCopyTypeIDDescription
PyMac_PRECHECK(CFCopyTypeIDDescription);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&theType))
return NULL;
@@ -2553,7 +2677,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFArrayGetTypeID
PyMac_PRECHECK(CFArrayGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFArrayGetTypeID();
@@ -2567,7 +2693,9 @@
PyObject *_res = NULL;
CFMutableArrayRef _rv;
CFIndex capacity;
+#ifndef CFArrayCreateMutable
PyMac_PRECHECK(CFArrayCreateMutable);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&capacity))
return NULL;
@@ -2585,7 +2713,9 @@
CFMutableArrayRef _rv;
CFIndex capacity;
CFArrayRef srcArray;
+#ifndef CFArrayCreateMutableCopy
PyMac_PRECHECK(CFArrayCreateMutableCopy);
+#endif
if (!PyArg_ParseTuple(_args, "lO&",
&capacity,
CFArrayRefObj_Convert, &srcArray))
@@ -2602,7 +2732,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFDataGetTypeID
PyMac_PRECHECK(CFDataGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFDataGetTypeID();
@@ -2618,7 +2750,9 @@
unsigned char *bytes__in__;
long bytes__len__;
int bytes__in_len__;
+#ifndef CFDataCreate
PyMac_PRECHECK(CFDataCreate);
+#endif
if (!PyArg_ParseTuple(_args, "s#",
&bytes__in__, &bytes__in_len__))
return NULL;
@@ -2637,7 +2771,9 @@
unsigned char *bytes__in__;
long bytes__len__;
int bytes__in_len__;
+#ifndef CFDataCreateWithBytesNoCopy
PyMac_PRECHECK(CFDataCreateWithBytesNoCopy);
+#endif
if (!PyArg_ParseTuple(_args, "s#",
&bytes__in__, &bytes__in_len__))
return NULL;
@@ -2655,7 +2791,9 @@
PyObject *_res = NULL;
CFMutableDataRef _rv;
CFIndex capacity;
+#ifndef CFDataCreateMutable
PyMac_PRECHECK(CFDataCreateMutable);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&capacity))
return NULL;
@@ -2672,7 +2810,9 @@
CFMutableDataRef _rv;
CFIndex capacity;
CFDataRef data;
+#ifndef CFDataCreateMutableCopy
PyMac_PRECHECK(CFDataCreateMutableCopy);
+#endif
if (!PyArg_ParseTuple(_args, "lO&",
&capacity,
CFDataRefObj_Convert, &data))
@@ -2689,7 +2829,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFDictionaryGetTypeID
PyMac_PRECHECK(CFDictionaryGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFDictionaryGetTypeID();
@@ -2703,7 +2845,9 @@
PyObject *_res = NULL;
CFMutableDictionaryRef _rv;
CFIndex capacity;
+#ifndef CFDictionaryCreateMutable
PyMac_PRECHECK(CFDictionaryCreateMutable);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&capacity))
return NULL;
@@ -2722,7 +2866,9 @@
CFMutableDictionaryRef _rv;
CFIndex capacity;
CFDictionaryRef dict;
+#ifndef CFDictionaryCreateMutableCopy
PyMac_PRECHECK(CFDictionaryCreateMutableCopy);
+#endif
if (!PyArg_ParseTuple(_args, "lO&",
&capacity,
CFDictionaryRefObj_Convert, &dict))
@@ -2739,7 +2885,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFStringGetTypeID
PyMac_PRECHECK(CFStringGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetTypeID();
@@ -2754,7 +2902,9 @@
CFStringRef _rv;
StringPtr pStr;
CFStringEncoding encoding;
+#ifndef CFStringCreateWithPascalString
PyMac_PRECHECK(CFStringCreateWithPascalString);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetStr255, &pStr,
&encoding))
@@ -2773,7 +2923,9 @@
CFStringRef _rv;
char* cStr;
CFStringEncoding encoding;
+#ifndef CFStringCreateWithCString
PyMac_PRECHECK(CFStringCreateWithCString);
+#endif
if (!PyArg_ParseTuple(_args, "sl",
&cStr,
&encoding))
@@ -2792,7 +2944,9 @@
CFStringRef _rv;
StringPtr pStr;
CFStringEncoding encoding;
+#ifndef CFStringCreateWithPascalStringNoCopy
PyMac_PRECHECK(CFStringCreateWithPascalStringNoCopy);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetStr255, &pStr,
&encoding))
@@ -2812,7 +2966,9 @@
CFStringRef _rv;
char* cStr;
CFStringEncoding encoding;
+#ifndef CFStringCreateWithCStringNoCopy
PyMac_PRECHECK(CFStringCreateWithCStringNoCopy);
+#endif
if (!PyArg_ParseTuple(_args, "sl",
&cStr,
&encoding))
@@ -2831,7 +2987,9 @@
PyObject *_res = NULL;
CFMutableStringRef _rv;
CFIndex maxLength;
+#ifndef CFStringCreateMutable
PyMac_PRECHECK(CFStringCreateMutable);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&maxLength))
return NULL;
@@ -2848,7 +3006,9 @@
CFMutableStringRef _rv;
CFIndex maxLength;
CFStringRef theString;
+#ifndef CFStringCreateMutableCopy
PyMac_PRECHECK(CFStringCreateMutableCopy);
+#endif
if (!PyArg_ParseTuple(_args, "lO&",
&maxLength,
CFStringRefObj_Convert, &theString))
@@ -2870,7 +3030,9 @@
int bytes__in_len__;
CFStringEncoding encoding;
Boolean isExternalRepresentation;
+#ifndef CFStringCreateWithBytes
PyMac_PRECHECK(CFStringCreateWithBytes);
+#endif
if (!PyArg_ParseTuple(_args, "s#ll",
&bytes__in__, &bytes__in_len__,
&encoding,
@@ -2890,7 +3052,9 @@
{
PyObject *_res = NULL;
CFStringEncoding _rv;
+#ifndef CFStringGetSystemEncoding
PyMac_PRECHECK(CFStringGetSystemEncoding);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFStringGetSystemEncoding();
@@ -2905,7 +3069,9 @@
CFIndex _rv;
CFIndex length;
CFStringEncoding encoding;
+#ifndef CFStringGetMaximumSizeForEncoding
PyMac_PRECHECK(CFStringGetMaximumSizeForEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&length,
&encoding))
@@ -2922,7 +3088,9 @@
PyObject *_res = NULL;
Boolean _rv;
CFStringEncoding encoding;
+#ifndef CFStringIsEncodingAvailable
PyMac_PRECHECK(CFStringIsEncodingAvailable);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -2937,7 +3105,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFStringEncoding encoding;
+#ifndef CFStringGetNameOfEncoding
PyMac_PRECHECK(CFStringGetNameOfEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -2952,7 +3122,9 @@
PyObject *_res = NULL;
UInt32 _rv;
CFStringEncoding encoding;
+#ifndef CFStringConvertEncodingToNSStringEncoding
PyMac_PRECHECK(CFStringConvertEncodingToNSStringEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -2967,7 +3139,9 @@
PyObject *_res = NULL;
CFStringEncoding _rv;
UInt32 encoding;
+#ifndef CFStringConvertNSStringEncodingToEncoding
PyMac_PRECHECK(CFStringConvertNSStringEncodingToEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -2982,7 +3156,9 @@
PyObject *_res = NULL;
UInt32 _rv;
CFStringEncoding encoding;
+#ifndef CFStringConvertEncodingToWindowsCodepage
PyMac_PRECHECK(CFStringConvertEncodingToWindowsCodepage);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -2997,7 +3173,9 @@
PyObject *_res = NULL;
CFStringEncoding _rv;
UInt32 codepage;
+#ifndef CFStringConvertWindowsCodepageToEncoding
PyMac_PRECHECK(CFStringConvertWindowsCodepageToEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&codepage))
return NULL;
@@ -3012,7 +3190,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
CFStringEncoding encoding;
+#ifndef CFStringConvertEncodingToIANACharSetName
PyMac_PRECHECK(CFStringConvertEncodingToIANACharSetName);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&encoding))
return NULL;
@@ -3027,7 +3207,9 @@
PyObject *_res = NULL;
CFStringRef _rv;
char* cStr;
+#ifndef __CFStringMakeConstantString
PyMac_PRECHECK(__CFStringMakeConstantString);
+#endif
if (!PyArg_ParseTuple(_args, "s",
&cStr))
return NULL;
@@ -3041,7 +3223,9 @@
{
PyObject *_res = NULL;
CFTypeID _rv;
+#ifndef CFURLGetTypeID
PyMac_PRECHECK(CFURLGetTypeID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CFURLGetTypeID();
@@ -3059,7 +3243,9 @@
int URLBytes__in_len__;
CFStringEncoding encoding;
CFURLRef baseURL;
+#ifndef CFURLCreateWithBytes
PyMac_PRECHECK(CFURLCreateWithBytes);
+#endif
if (!PyArg_ParseTuple(_args, "s#lO&",
&URLBytes__in__, &URLBytes__in_len__,
&encoding,
diff --git a/Mac/Modules/cm/_Cmmodule.c b/Mac/Modules/cm/_Cmmodule.c
index b643c82..3e66716 100644
--- a/Mac/Modules/cm/_Cmmodule.c
+++ b/Mac/Modules/cm/_Cmmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -291,7 +287,7 @@
#define CmpInstObj_hash NULL
PyTypeObject ComponentInstance_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"ComponentInstance", /*tp_name*/
sizeof(ComponentInstanceObject), /*tp_basicsize*/
@@ -618,7 +614,7 @@
#define CmpObj_hash NULL
PyTypeObject Component_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Component", /*tp_name*/
sizeof(ComponentObject), /*tp_basicsize*/
diff --git a/Mac/Modules/ctl/_Ctlmodule.c b/Mac/Modules/ctl/_Ctlmodule.c
index 837e86a..16c4a32 100644
--- a/Mac/Modules/ctl/_Ctlmodule.c
+++ b/Mac/Modules/ctl/_Ctlmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -144,6 +140,9 @@
{
PyObject *_res = NULL;
ControlPartCode hiliteState;
+#ifndef HiliteControl
+ PyMac_PRECHECK(HiliteControl);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&hiliteState))
return NULL;
@@ -157,6 +156,9 @@
static PyObject *CtlObj_ShowControl(ControlObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ShowControl
+ PyMac_PRECHECK(ShowControl);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ShowControl(_self->ob_itself);
@@ -168,6 +170,9 @@
static PyObject *CtlObj_HideControl(ControlObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef HideControl
+ PyMac_PRECHECK(HideControl);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
HideControl(_self->ob_itself);
@@ -180,6 +185,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsControlActive
+ PyMac_PRECHECK(IsControlActive);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsControlActive(_self->ob_itself);
@@ -192,6 +200,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsControlVisible
+ PyMac_PRECHECK(IsControlVisible);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsControlVisible(_self->ob_itself);
@@ -204,6 +215,9 @@
{
PyObject *_res = NULL;
OSErr _err;
+#ifndef ActivateControl
+ PyMac_PRECHECK(ActivateControl);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = ActivateControl(_self->ob_itself);
@@ -217,6 +231,9 @@
{
PyObject *_res = NULL;
OSErr _err;
+#ifndef DeactivateControl
+ PyMac_PRECHECK(DeactivateControl);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = DeactivateControl(_self->ob_itself);
@@ -232,6 +249,9 @@
OSErr _err;
Boolean inIsVisible;
Boolean inDoDraw;
+#ifndef SetControlVisibility
+ PyMac_PRECHECK(SetControlVisibility);
+#endif
if (!PyArg_ParseTuple(_args, "bb",
&inIsVisible,
&inDoDraw))
@@ -248,6 +268,9 @@
static PyObject *CtlObj_Draw1Control(ControlObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef Draw1Control
+ PyMac_PRECHECK(Draw1Control);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
Draw1Control(_self->ob_itself);
@@ -262,6 +285,9 @@
OSErr _err;
Rect outRect;
SInt16 outBaseLineOffset;
+#ifndef GetBestControlRect
+ PyMac_PRECHECK(GetBestControlRect);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetBestControlRect(_self->ob_itself,
@@ -279,6 +305,9 @@
PyObject *_res = NULL;
OSErr _err;
ControlFontStyleRec inStyle;
+#ifndef SetControlFontStyle
+ PyMac_PRECHECK(SetControlFontStyle);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ControlFontStyle_Convert, &inStyle))
return NULL;
@@ -293,6 +322,9 @@
static PyObject *CtlObj_DrawControlInCurrentPort(ControlObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DrawControlInCurrentPort
+ PyMac_PRECHECK(DrawControlInCurrentPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DrawControlInCurrentPort(_self->ob_itself);
@@ -307,6 +339,9 @@
OSErr _err;
SInt16 inDepth;
Boolean inIsColorDevice;
+#ifndef SetUpControlBackground
+ PyMac_PRECHECK(SetUpControlBackground);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&inDepth,
&inIsColorDevice))
@@ -326,6 +361,9 @@
OSErr _err;
SInt16 inDepth;
Boolean inIsColorDevice;
+#ifndef SetUpControlTextColor
+ PyMac_PRECHECK(SetUpControlTextColor);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&inDepth,
&inIsColorDevice))
@@ -346,6 +384,9 @@
Rect limitRect;
Rect slopRect;
DragConstraint axis;
+#ifndef DragControl
+ PyMac_PRECHECK(DragControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&H",
PyMac_GetPoint, &startPoint,
PyMac_GetRect, &limitRect,
@@ -367,6 +408,9 @@
PyObject *_res = NULL;
ControlPartCode _rv;
Point testPoint;
+#ifndef TestControl
+ PyMac_PRECHECK(TestControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &testPoint))
return NULL;
@@ -385,6 +429,9 @@
OSStatus _err;
Point inWhere;
Boolean menuDisplayed;
+#ifndef HandleControlContextualMenuClick
+ PyMac_PRECHECK(HandleControlContextualMenuClick);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &inWhere))
return NULL;
@@ -407,6 +454,9 @@
Point inWhere;
EventModifiers inModifiers;
ClickActivationResult outResult;
+#ifndef GetControlClickActivation
+ PyMac_PRECHECK(GetControlClickActivation);
+#endif
if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetPoint, &inWhere,
&inModifiers))
@@ -429,6 +479,9 @@
SInt16 inKeyCode;
SInt16 inCharCode;
EventModifiers inModifiers;
+#ifndef HandleControlKey
+ PyMac_PRECHECK(HandleControlKey);
+#endif
if (!PyArg_ParseTuple(_args, "hhH",
&inKeyCode,
&inCharCode,
@@ -452,6 +505,9 @@
Point localPoint;
EventModifiers modifiers;
Boolean cursorWasSet;
+#ifndef HandleControlSetCursor
+ PyMac_PRECHECK(HandleControlSetCursor);
+#endif
if (!PyArg_ParseTuple(_args, "O&H",
PyMac_GetPoint, &localPoint,
&modifiers))
@@ -472,6 +528,9 @@
PyObject *_res = NULL;
SInt16 h;
SInt16 v;
+#ifndef MoveControl
+ PyMac_PRECHECK(MoveControl);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&h,
&v))
@@ -489,6 +548,9 @@
PyObject *_res = NULL;
SInt16 w;
SInt16 h;
+#ifndef SizeControl
+ PyMac_PRECHECK(SizeControl);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&w,
&h))
@@ -505,6 +567,9 @@
{
PyObject *_res = NULL;
Str255 title;
+#ifndef SetControlTitle
+ PyMac_PRECHECK(SetControlTitle);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, title))
return NULL;
@@ -519,6 +584,9 @@
{
PyObject *_res = NULL;
Str255 title;
+#ifndef GetControlTitle
+ PyMac_PRECHECK(GetControlTitle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetControlTitle(_self->ob_itself,
@@ -532,6 +600,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetControlValue
+ PyMac_PRECHECK(GetControlValue);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlValue(_self->ob_itself);
@@ -544,6 +615,9 @@
{
PyObject *_res = NULL;
SInt16 newValue;
+#ifndef SetControlValue
+ PyMac_PRECHECK(SetControlValue);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&newValue))
return NULL;
@@ -558,6 +632,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetControlMinimum
+ PyMac_PRECHECK(GetControlMinimum);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlMinimum(_self->ob_itself);
@@ -570,6 +647,9 @@
{
PyObject *_res = NULL;
SInt16 newMinimum;
+#ifndef SetControlMinimum
+ PyMac_PRECHECK(SetControlMinimum);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&newMinimum))
return NULL;
@@ -584,6 +664,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetControlMaximum
+ PyMac_PRECHECK(GetControlMaximum);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlMaximum(_self->ob_itself);
@@ -596,6 +679,9 @@
{
PyObject *_res = NULL;
SInt16 newMaximum;
+#ifndef SetControlMaximum
+ PyMac_PRECHECK(SetControlMaximum);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&newMaximum))
return NULL;
@@ -610,6 +696,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef GetControlViewSize
+ PyMac_PRECHECK(GetControlViewSize);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlViewSize(_self->ob_itself);
@@ -622,6 +711,9 @@
{
PyObject *_res = NULL;
SInt32 newViewSize;
+#ifndef SetControlViewSize
+ PyMac_PRECHECK(SetControlViewSize);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&newViewSize))
return NULL;
@@ -636,6 +728,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef GetControl32BitValue
+ PyMac_PRECHECK(GetControl32BitValue);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControl32BitValue(_self->ob_itself);
@@ -648,6 +743,9 @@
{
PyObject *_res = NULL;
SInt32 newValue;
+#ifndef SetControl32BitValue
+ PyMac_PRECHECK(SetControl32BitValue);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&newValue))
return NULL;
@@ -662,6 +760,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef GetControl32BitMaximum
+ PyMac_PRECHECK(GetControl32BitMaximum);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControl32BitMaximum(_self->ob_itself);
@@ -674,6 +775,9 @@
{
PyObject *_res = NULL;
SInt32 newMaximum;
+#ifndef SetControl32BitMaximum
+ PyMac_PRECHECK(SetControl32BitMaximum);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&newMaximum))
return NULL;
@@ -688,6 +792,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef GetControl32BitMinimum
+ PyMac_PRECHECK(GetControl32BitMinimum);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControl32BitMinimum(_self->ob_itself);
@@ -700,6 +807,9 @@
{
PyObject *_res = NULL;
SInt32 newMinimum;
+#ifndef SetControl32BitMinimum
+ PyMac_PRECHECK(SetControl32BitMinimum);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&newMinimum))
return NULL;
@@ -714,6 +824,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsValidControlHandle
+ PyMac_PRECHECK(IsValidControlHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsValidControlHandle(_self->ob_itself);
@@ -729,6 +842,9 @@
PyObject *_res = NULL;
OSStatus _err;
ControlID inID;
+#ifndef SetControlID
+ PyMac_PRECHECK(SetControlID);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyControlID_Convert, &inID))
return NULL;
@@ -748,6 +864,9 @@
PyObject *_res = NULL;
OSStatus _err;
ControlID outID;
+#ifndef GetControlID
+ PyMac_PRECHECK(GetControlID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetControlID(_self->ob_itself,
@@ -765,6 +884,9 @@
OSStatus _err;
OSType propertyCreator;
OSType propertyTag;
+#ifndef RemoveControlProperty
+ PyMac_PRECHECK(RemoveControlProperty);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetOSType, &propertyCreator,
PyMac_GetOSType, &propertyTag))
@@ -787,6 +909,9 @@
OSType propertyCreator;
OSType propertyTag;
UInt32 attributes;
+#ifndef GetControlPropertyAttributes
+ PyMac_PRECHECK(GetControlPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetOSType, &propertyCreator,
PyMac_GetOSType, &propertyTag))
@@ -812,6 +937,9 @@
OSType propertyTag;
UInt32 attributesToSet;
UInt32 attributesToClear;
+#ifndef ChangeControlPropertyAttributes
+ PyMac_PRECHECK(ChangeControlPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&ll",
PyMac_GetOSType, &propertyCreator,
PyMac_GetOSType, &propertyTag,
@@ -836,6 +964,9 @@
OSStatus _err;
ControlPartCode inPart;
RgnHandle outRegion;
+#ifndef GetControlRegion
+ PyMac_PRECHECK(GetControlRegion);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&inPart,
ResObj_Convert, &outRegion))
@@ -853,6 +984,9 @@
{
PyObject *_res = NULL;
ControlVariant _rv;
+#ifndef GetControlVariant
+ PyMac_PRECHECK(GetControlVariant);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlVariant(_self->ob_itself);
@@ -865,6 +999,9 @@
{
PyObject *_res = NULL;
SInt32 data;
+#ifndef SetControlReference
+ PyMac_PRECHECK(SetControlReference);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&data))
return NULL;
@@ -879,6 +1016,9 @@
{
PyObject *_res = NULL;
SInt32 _rv;
+#ifndef GetControlReference
+ PyMac_PRECHECK(GetControlReference);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlReference(_self->ob_itself);
@@ -894,6 +1034,9 @@
PyObject *_res = NULL;
Boolean _rv;
AuxCtlHandle acHndl;
+#ifndef GetAuxiliaryControlRecord
+ PyMac_PRECHECK(GetAuxiliaryControlRecord);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetAuxiliaryControlRecord(_self->ob_itself,
@@ -911,6 +1054,9 @@
{
PyObject *_res = NULL;
CCTabHandle newColorTable;
+#ifndef SetControlColor
+ PyMac_PRECHECK(SetControlColor);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &newColorTable))
return NULL;
@@ -927,6 +1073,9 @@
PyObject *_res = NULL;
OSErr _err;
ControlHandle inContainer;
+#ifndef EmbedControl
+ PyMac_PRECHECK(EmbedControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CtlObj_Convert, &inContainer))
return NULL;
@@ -943,6 +1092,9 @@
PyObject *_res = NULL;
OSErr _err;
WindowPtr inWindow;
+#ifndef AutoEmbedControl
+ PyMac_PRECHECK(AutoEmbedControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -959,6 +1111,9 @@
PyObject *_res = NULL;
OSErr _err;
ControlHandle outParent;
+#ifndef GetSuperControl
+ PyMac_PRECHECK(GetSuperControl);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetSuperControl(_self->ob_itself,
@@ -974,6 +1129,9 @@
PyObject *_res = NULL;
OSErr _err;
UInt16 outNumChildren;
+#ifndef CountSubControls
+ PyMac_PRECHECK(CountSubControls);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = CountSubControls(_self->ob_itself,
@@ -990,6 +1148,9 @@
OSErr _err;
UInt16 inIndex;
ControlHandle outSubControl;
+#ifndef GetIndexedSubControl
+ PyMac_PRECHECK(GetIndexedSubControl);
+#endif
if (!PyArg_ParseTuple(_args, "H",
&inIndex))
return NULL;
@@ -1007,6 +1168,9 @@
PyObject *_res = NULL;
OSErr _err;
ControlHandle inBoss;
+#ifndef SetControlSupervisor
+ PyMac_PRECHECK(SetControlSupervisor);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
CtlObj_Convert, &inBoss))
return NULL;
@@ -1023,6 +1187,9 @@
PyObject *_res = NULL;
OSErr _err;
UInt32 outFeatures;
+#ifndef GetControlFeatures
+ PyMac_PRECHECK(GetControlFeatures);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetControlFeatures(_self->ob_itself,
@@ -1040,6 +1207,9 @@
ControlPartCode inPart;
ResType inTagName;
Size outMaxSize;
+#ifndef GetControlDataSize
+ PyMac_PRECHECK(GetControlDataSize);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&inPart,
PyMac_GetOSType, &inTagName))
@@ -1063,6 +1233,9 @@
DragTrackingMessage inMessage;
DragReference inDrag;
Boolean outLikesDrag;
+#ifndef HandleControlDragTracking
+ PyMac_PRECHECK(HandleControlDragTracking);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&inMessage,
DragObj_Convert, &inDrag))
@@ -1085,6 +1258,9 @@
PyObject *_res = NULL;
OSStatus _err;
DragReference inDrag;
+#ifndef HandleControlDragReceive
+ PyMac_PRECHECK(HandleControlDragReceive);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
DragObj_Convert, &inDrag))
return NULL;
@@ -1104,6 +1280,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean tracks;
+#ifndef SetControlDragTrackingEnabled
+ PyMac_PRECHECK(SetControlDragTrackingEnabled);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&tracks))
return NULL;
@@ -1123,6 +1302,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean tracks;
+#ifndef IsControlDragTrackingEnabled
+ PyMac_PRECHECK(IsControlDragTrackingEnabled);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = IsControlDragTrackingEnabled(_self->ob_itself,
@@ -1140,6 +1322,9 @@
{
PyObject *_res = NULL;
Rect bounds;
+#ifndef GetControlBounds
+ PyMac_PRECHECK(GetControlBounds);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetControlBounds(_self->ob_itself,
@@ -1156,6 +1341,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsControlHilited
+ PyMac_PRECHECK(IsControlHilited);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsControlHilited(_self->ob_itself);
@@ -1171,6 +1359,9 @@
{
PyObject *_res = NULL;
UInt16 _rv;
+#ifndef GetControlHilite
+ PyMac_PRECHECK(GetControlHilite);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlHilite(_self->ob_itself);
@@ -1186,6 +1377,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef GetControlOwner
+ PyMac_PRECHECK(GetControlOwner);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlOwner(_self->ob_itself);
@@ -1201,6 +1395,9 @@
{
PyObject *_res = NULL;
Handle _rv;
+#ifndef GetControlDataHandle
+ PyMac_PRECHECK(GetControlDataHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlDataHandle(_self->ob_itself);
@@ -1216,6 +1413,9 @@
{
PyObject *_res = NULL;
MenuHandle _rv;
+#ifndef GetControlPopupMenuHandle
+ PyMac_PRECHECK(GetControlPopupMenuHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlPopupMenuHandle(_self->ob_itself);
@@ -1231,6 +1431,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef GetControlPopupMenuID
+ PyMac_PRECHECK(GetControlPopupMenuID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetControlPopupMenuID(_self->ob_itself);
@@ -1246,6 +1449,9 @@
{
PyObject *_res = NULL;
Handle dataHandle;
+#ifndef SetControlDataHandle
+ PyMac_PRECHECK(SetControlDataHandle);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &dataHandle))
return NULL;
@@ -1263,6 +1469,9 @@
{
PyObject *_res = NULL;
Rect bounds;
+#ifndef SetControlBounds
+ PyMac_PRECHECK(SetControlBounds);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &bounds))
return NULL;
@@ -1280,6 +1489,9 @@
{
PyObject *_res = NULL;
MenuHandle popupMenu;
+#ifndef SetControlPopupMenuHandle
+ PyMac_PRECHECK(SetControlPopupMenuHandle);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
MenuObj_Convert, &popupMenu))
return NULL;
@@ -1297,6 +1509,9 @@
{
PyObject *_res = NULL;
short menuID;
+#ifndef SetControlPopupMenuID
+ PyMac_PRECHECK(SetControlPopupMenuID);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -1313,6 +1528,9 @@
PyObject *_res = NULL;
OSErr _err;
SInt16 outValue;
+#ifndef GetBevelButtonMenuValue
+ PyMac_PRECHECK(GetBevelButtonMenuValue);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetBevelButtonMenuValue(_self->ob_itself,
@@ -1328,6 +1546,9 @@
PyObject *_res = NULL;
OSErr _err;
SInt16 inValue;
+#ifndef SetBevelButtonMenuValue
+ PyMac_PRECHECK(SetBevelButtonMenuValue);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inValue))
return NULL;
@@ -1344,6 +1565,9 @@
PyObject *_res = NULL;
OSErr _err;
MenuHandle outHandle;
+#ifndef GetBevelButtonMenuHandle
+ PyMac_PRECHECK(GetBevelButtonMenuHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetBevelButtonMenuHandle(_self->ob_itself,
@@ -1359,6 +1583,9 @@
PyObject *_res = NULL;
OSErr _err;
IconTransformType transform;
+#ifndef SetBevelButtonTransform
+ PyMac_PRECHECK(SetBevelButtonTransform);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&transform))
return NULL;
@@ -1375,6 +1602,9 @@
PyObject *_res = NULL;
OSErr _err;
SInt16 inValue;
+#ifndef SetDisclosureTriangleLastValue
+ PyMac_PRECHECK(SetDisclosureTriangleLastValue);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inValue))
return NULL;
@@ -1391,6 +1621,9 @@
PyObject *_res = NULL;
OSErr _err;
Rect outContentRect;
+#ifndef GetTabContentRect
+ PyMac_PRECHECK(GetTabContentRect);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetTabContentRect(_self->ob_itself,
@@ -1407,6 +1640,9 @@
OSErr _err;
SInt16 inTabToHilite;
Boolean inEnabled;
+#ifndef SetTabEnabled
+ PyMac_PRECHECK(SetTabEnabled);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&inTabToHilite,
&inEnabled))
@@ -1425,6 +1661,9 @@
PyObject *_res = NULL;
OSErr _err;
IconTransformType inTransform;
+#ifndef SetImageWellTransform
+ PyMac_PRECHECK(SetImageWellTransform);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inTransform))
return NULL;
@@ -1440,6 +1679,9 @@
{
PyObject *_res = NULL;
Handle _rv;
+#ifndef as_Resource
+ PyMac_PRECHECK(as_Resource);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = as_Resource(_self->ob_itself);
@@ -1452,6 +1694,9 @@
{
PyObject *_res = NULL;
Rect rect;
+#ifndef GetControlRect
+ PyMac_PRECHECK(GetControlRect);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetControlRect(_self->ob_itself,
@@ -2066,7 +2311,7 @@
}
PyTypeObject Control_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Control", /*tp_name*/
sizeof(ControlObject), /*tp_basicsize*/
@@ -2100,6 +2345,9 @@
SInt16 maximumValue;
SInt16 procID;
SInt32 controlReference;
+#ifndef NewControl
+ PyMac_PRECHECK(NewControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&bhhhhl",
WinObj_Convert, &owningWindow,
PyMac_GetRect, &boundsRect,
@@ -2131,6 +2379,9 @@
ControlHandle _rv;
SInt16 resourceID;
WindowPtr owningWindow;
+#ifndef GetNewControl
+ PyMac_PRECHECK(GetNewControl);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&resourceID,
WinObj_Convert, &owningWindow))
@@ -2146,6 +2397,9 @@
{
PyObject *_res = NULL;
WindowPtr theWindow;
+#ifndef DrawControls
+ PyMac_PRECHECK(DrawControls);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &theWindow))
return NULL;
@@ -2160,6 +2414,9 @@
PyObject *_res = NULL;
WindowPtr theWindow;
RgnHandle updateRegion;
+#ifndef UpdateControls
+ PyMac_PRECHECK(UpdateControls);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
WinObj_Convert, &theWindow,
ResObj_Convert, &updateRegion))
@@ -2178,6 +2435,9 @@
Point testPoint;
WindowPtr theWindow;
ControlHandle theControl;
+#ifndef FindControl
+ PyMac_PRECHECK(FindControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetPoint, &testPoint,
WinObj_Convert, &theWindow))
@@ -2198,6 +2458,9 @@
Point inWhere;
WindowPtr inWindow;
SInt16 outPart;
+#ifndef FindControlUnderMouse
+ PyMac_PRECHECK(FindControlUnderMouse);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetPoint, &inWhere,
WinObj_Convert, &inWindow))
@@ -2215,6 +2478,9 @@
{
PyObject *_res = NULL;
WindowPtr inWindow;
+#ifndef IdleControls
+ PyMac_PRECHECK(IdleControls);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2233,6 +2499,9 @@
WindowPtr inWindow;
ControlID inID;
ControlHandle outControl;
+#ifndef GetControlByID
+ PyMac_PRECHECK(GetControlByID);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
WinObj_Convert, &inWindow,
PyControlID_Convert, &inID))
@@ -2253,6 +2522,9 @@
OSErr _err;
WindowPtr inWindow;
FSSpec inDumpFile;
+#ifndef DumpControlHierarchy
+ PyMac_PRECHECK(DumpControlHierarchy);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
WinObj_Convert, &inWindow,
PyMac_GetFSSpec, &inDumpFile))
@@ -2271,6 +2543,9 @@
OSErr _err;
WindowPtr inWindow;
ControlHandle outControl;
+#ifndef CreateRootControl
+ PyMac_PRECHECK(CreateRootControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2288,6 +2563,9 @@
OSErr _err;
WindowPtr inWindow;
ControlHandle outControl;
+#ifndef GetRootControl
+ PyMac_PRECHECK(GetRootControl);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2305,6 +2583,9 @@
OSErr _err;
WindowPtr inWindow;
ControlHandle outControl;
+#ifndef GetKeyboardFocus
+ PyMac_PRECHECK(GetKeyboardFocus);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2323,6 +2604,9 @@
WindowPtr inWindow;
ControlHandle inControl;
ControlFocusPart inPart;
+#ifndef SetKeyboardFocus
+ PyMac_PRECHECK(SetKeyboardFocus);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&h",
WinObj_Convert, &inWindow,
CtlObj_Convert, &inControl,
@@ -2342,6 +2626,9 @@
PyObject *_res = NULL;
OSErr _err;
WindowPtr inWindow;
+#ifndef AdvanceKeyboardFocus
+ PyMac_PRECHECK(AdvanceKeyboardFocus);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2357,6 +2644,9 @@
PyObject *_res = NULL;
OSErr _err;
WindowPtr inWindow;
+#ifndef ReverseKeyboardFocus
+ PyMac_PRECHECK(ReverseKeyboardFocus);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2372,6 +2662,9 @@
PyObject *_res = NULL;
OSErr _err;
WindowPtr inWindow;
+#ifndef ClearKeyboardFocus
+ PyMac_PRECHECK(ClearKeyboardFocus);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &inWindow))
return NULL;
@@ -2390,6 +2683,9 @@
OSStatus _err;
WindowPtr theWindow;
Boolean tracks;
+#ifndef SetAutomaticControlDragTrackingEnabledForWindow
+ PyMac_PRECHECK(SetAutomaticControlDragTrackingEnabledForWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&b",
WinObj_Convert, &theWindow,
&tracks))
@@ -2411,6 +2707,9 @@
OSStatus _err;
WindowPtr theWindow;
Boolean tracks;
+#ifndef IsAutomaticControlDragTrackingEnabledForWindow
+ PyMac_PRECHECK(IsAutomaticControlDragTrackingEnabledForWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &theWindow))
return NULL;
@@ -2428,6 +2727,9 @@
PyObject *_res = NULL;
ControlHandle _rv;
Handle h;
+#ifndef as_Control
+ PyMac_PRECHECK(as_Control);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &h))
return NULL;
diff --git a/Mac/Modules/ctl/ctlsupport.py b/Mac/Modules/ctl/ctlsupport.py
index d84368c..384ba9f 100644
--- a/Mac/Modules/ctl/ctlsupport.py
+++ b/Mac/Modules/ctl/ctlsupport.py
@@ -336,8 +336,8 @@
module.addobject(object)
# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
+Function = OSErrWeakLinkFunctionGenerator
+Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists
functions = []
diff --git a/Mac/Modules/dlg/_Dlgmodule.c b/Mac/Modules/dlg/_Dlgmodule.c
index 6983321..f4f2a24 100644
--- a/Mac/Modules/dlg/_Dlgmodule.c
+++ b/Mac/Modules/dlg/_Dlgmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -185,6 +181,9 @@
static PyObject *DlgObj_DrawDialog(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DrawDialog
+ PyMac_PRECHECK(DrawDialog);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DrawDialog(_self->ob_itself);
@@ -197,6 +196,9 @@
{
PyObject *_res = NULL;
RgnHandle updateRgn;
+#ifndef UpdateDialog
+ PyMac_PRECHECK(UpdateDialog);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &updateRgn))
return NULL;
@@ -211,6 +213,9 @@
{
PyObject *_res = NULL;
DialogItemIndex itemNo;
+#ifndef HideDialogItem
+ PyMac_PRECHECK(HideDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&itemNo))
return NULL;
@@ -225,6 +230,9 @@
{
PyObject *_res = NULL;
DialogItemIndex itemNo;
+#ifndef ShowDialogItem
+ PyMac_PRECHECK(ShowDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&itemNo))
return NULL;
@@ -240,6 +248,9 @@
PyObject *_res = NULL;
DialogItemIndexZeroBased _rv;
Point thePt;
+#ifndef FindDialogItem
+ PyMac_PRECHECK(FindDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePt))
return NULL;
@@ -253,6 +264,9 @@
static PyObject *DlgObj_DialogCut(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DialogCut
+ PyMac_PRECHECK(DialogCut);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DialogCut(_self->ob_itself);
@@ -264,6 +278,9 @@
static PyObject *DlgObj_DialogPaste(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DialogPaste
+ PyMac_PRECHECK(DialogPaste);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DialogPaste(_self->ob_itself);
@@ -275,6 +292,9 @@
static PyObject *DlgObj_DialogCopy(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DialogCopy
+ PyMac_PRECHECK(DialogCopy);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DialogCopy(_self->ob_itself);
@@ -286,6 +306,9 @@
static PyObject *DlgObj_DialogDelete(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DialogDelete
+ PyMac_PRECHECK(DialogDelete);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DialogDelete(_self->ob_itself);
@@ -301,6 +324,9 @@
DialogItemType itemType;
Handle item;
Rect box;
+#ifndef GetDialogItem
+ PyMac_PRECHECK(GetDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&itemNo))
return NULL;
@@ -323,6 +349,9 @@
DialogItemType itemType;
Handle item;
Rect box;
+#ifndef SetDialogItem
+ PyMac_PRECHECK(SetDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "hhO&O&",
&itemNo,
&itemType,
@@ -345,6 +374,9 @@
DialogItemIndex itemNo;
SInt16 strtSel;
SInt16 endSel;
+#ifndef SelectDialogItemText
+ PyMac_PRECHECK(SelectDialogItemText);
+#endif
if (!PyArg_ParseTuple(_args, "hhh",
&itemNo,
&strtSel,
@@ -364,6 +396,9 @@
PyObject *_res = NULL;
Handle theHandle;
DITLMethod method;
+#ifndef AppendDITL
+ PyMac_PRECHECK(AppendDITL);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
ResObj_Convert, &theHandle,
&method))
@@ -380,6 +415,9 @@
{
PyObject *_res = NULL;
DialogItemIndex _rv;
+#ifndef CountDITL
+ PyMac_PRECHECK(CountDITL);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CountDITL(_self->ob_itself);
@@ -392,6 +430,9 @@
{
PyObject *_res = NULL;
DialogItemIndex numberItems;
+#ifndef ShortenDITL
+ PyMac_PRECHECK(ShortenDITL);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&numberItems))
return NULL;
@@ -412,6 +453,9 @@
DialogItemType itemType;
Handle itemHandle;
Rect box;
+#ifndef InsertDialogItem
+ PyMac_PRECHECK(InsertDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "hhO&O&",
&afterItem,
&itemType,
@@ -439,6 +483,9 @@
DialogItemIndex itemNo;
DialogItemIndex amountToRemove;
Boolean disposeItemData;
+#ifndef RemoveDialogItems
+ PyMac_PRECHECK(RemoveDialogItems);
+#endif
if (!PyArg_ParseTuple(_args, "hhb",
&itemNo,
&amountToRemove,
@@ -461,6 +508,9 @@
Boolean _rv;
EventRecord event;
DialogItemIndex itemHit;
+#ifndef StdFilterProc
+ PyMac_PRECHECK(StdFilterProc);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = StdFilterProc(_self->ob_itself,
@@ -478,6 +528,9 @@
PyObject *_res = NULL;
OSErr _err;
DialogItemIndex newItem;
+#ifndef SetDialogDefaultItem
+ PyMac_PRECHECK(SetDialogDefaultItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&newItem))
return NULL;
@@ -494,6 +547,9 @@
PyObject *_res = NULL;
OSErr _err;
DialogItemIndex newItem;
+#ifndef SetDialogCancelItem
+ PyMac_PRECHECK(SetDialogCancelItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&newItem))
return NULL;
@@ -510,6 +566,9 @@
PyObject *_res = NULL;
OSErr _err;
Boolean tracks;
+#ifndef SetDialogTracksCursor
+ PyMac_PRECHECK(SetDialogTracksCursor);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&tracks))
return NULL;
@@ -525,6 +584,9 @@
{
PyObject *_res = NULL;
OSErr _err;
+#ifndef AutoSizeDialog
+ PyMac_PRECHECK(AutoSizeDialog);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = AutoSizeDialog(_self->ob_itself);
@@ -540,6 +602,9 @@
OSErr _err;
SInt16 inItemNo;
ControlHandle outControl;
+#ifndef GetDialogItemAsControl
+ PyMac_PRECHECK(GetDialogItemAsControl);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItemNo))
return NULL;
@@ -559,6 +624,9 @@
SInt16 inItemNo;
SInt16 inHoriz;
SInt16 inVert;
+#ifndef MoveDialogItem
+ PyMac_PRECHECK(MoveDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "hhh",
&inItemNo,
&inHoriz,
@@ -581,6 +649,9 @@
SInt16 inItemNo;
SInt16 inWidth;
SInt16 inHeight;
+#ifndef SizeDialogItem
+ PyMac_PRECHECK(SizeDialogItem);
+#endif
if (!PyArg_ParseTuple(_args, "hhh",
&inItemNo,
&inWidth,
@@ -602,6 +673,9 @@
OSErr _err;
SInt16 ditlID;
DITLMethod method;
+#ifndef AppendDialogItemList
+ PyMac_PRECHECK(AppendDialogItemList);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&ditlID,
&method))
@@ -621,6 +695,9 @@
OSStatus _err;
SInt16 inButtonToPress;
UInt32 inSecondsToWait;
+#ifndef SetDialogTimeout
+ PyMac_PRECHECK(SetDialogTimeout);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&inButtonToPress,
&inSecondsToWait))
@@ -641,6 +718,9 @@
SInt16 outButtonToPress;
UInt32 outSecondsToWait;
UInt32 outSecondsRemaining;
+#ifndef GetDialogTimeout
+ PyMac_PRECHECK(GetDialogTimeout);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetDialogTimeout(_self->ob_itself,
@@ -660,6 +740,9 @@
PyObject *_res = NULL;
OSStatus _err;
EventMask inMask;
+#ifndef SetModalDialogEventMask
+ PyMac_PRECHECK(SetModalDialogEventMask);
+#endif
if (!PyArg_ParseTuple(_args, "H",
&inMask))
return NULL;
@@ -676,6 +759,9 @@
PyObject *_res = NULL;
OSStatus _err;
EventMask outMask;
+#ifndef GetModalDialogEventMask
+ PyMac_PRECHECK(GetModalDialogEventMask);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetModalDialogEventMask(_self->ob_itself,
@@ -690,6 +776,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef GetDialogWindow
+ PyMac_PRECHECK(GetDialogWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogWindow(_self->ob_itself);
@@ -702,6 +791,9 @@
{
PyObject *_res = NULL;
TEHandle _rv;
+#ifndef GetDialogTextEditHandle
+ PyMac_PRECHECK(GetDialogTextEditHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogTextEditHandle(_self->ob_itself);
@@ -714,6 +806,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetDialogDefaultItem
+ PyMac_PRECHECK(GetDialogDefaultItem);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogDefaultItem(_self->ob_itself);
@@ -726,6 +821,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetDialogCancelItem
+ PyMac_PRECHECK(GetDialogCancelItem);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogCancelItem(_self->ob_itself);
@@ -738,6 +836,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetDialogKeyboardFocusItem
+ PyMac_PRECHECK(GetDialogKeyboardFocusItem);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogKeyboardFocusItem(_self->ob_itself);
@@ -749,6 +850,9 @@
static PyObject *DlgObj_SetPortDialogPort(DialogObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef SetPortDialogPort
+ PyMac_PRECHECK(SetPortDialogPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
SetPortDialogPort(_self->ob_itself);
@@ -761,6 +865,9 @@
{
PyObject *_res = NULL;
CGrafPtr _rv;
+#ifndef GetDialogPort
+ PyMac_PRECHECK(GetDialogPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetDialogPort(_self->ob_itself);
@@ -769,6 +876,23 @@
return _res;
}
+#if !TARGET_API_MAC_CARBON
+
+static PyObject *DlgObj_SetGrafPortOfDialog(DialogObject *_self, PyObject *_args)
+{
+ PyObject *_res = NULL;
+#ifndef SetGrafPortOfDialog
+ PyMac_PRECHECK(SetGrafPortOfDialog);
+#endif
+ if (!PyArg_ParseTuple(_args, ""))
+ return NULL;
+ SetGrafPortOfDialog(_self->ob_itself);
+ Py_INCREF(Py_None);
+ _res = Py_None;
+ return _res;
+}
+#endif
+
static PyMethodDef DlgObj_methods[] = {
{"DrawDialog", (PyCFunction)DlgObj_DrawDialog, 1,
"() -> None"},
@@ -851,6 +975,10 @@
{"GetDialogPort", (PyCFunction)DlgObj_GetDialogPort, 1,
"() -> (CGrafPtr _rv)"},
+#if !TARGET_API_MAC_CARBON
+ {"SetGrafPortOfDialog", (PyCFunction)DlgObj_SetGrafPortOfDialog, 1,
+ "() -> None"},
+#endif
{NULL, NULL, 0}
};
@@ -878,7 +1006,7 @@
}
PyTypeObject Dialog_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Dialog", /*tp_name*/
sizeof(DialogObject), /*tp_basicsize*/
@@ -911,6 +1039,9 @@
Boolean goAwayFlag;
SInt32 refCon;
Handle items;
+#ifndef NewDialog
+ PyMac_PRECHECK(NewDialog);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
PyMac_GetRect, &boundsRect,
PyMac_GetStr255, title,
@@ -941,6 +1072,9 @@
DialogPtr _rv;
SInt16 dialogID;
WindowPtr behind;
+#ifndef GetNewDialog
+ PyMac_PRECHECK(GetNewDialog);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&dialogID,
WinObj_Convert, &behind))
@@ -965,6 +1099,9 @@
Boolean goAwayFlag;
SInt32 refCon;
Handle items;
+#ifndef NewColorDialog
+ PyMac_PRECHECK(NewColorDialog);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&",
PyMac_GetRect, &boundsRect,
PyMac_GetStr255, title,
@@ -994,6 +1131,9 @@
PyObject *_res = NULL;
PyObject* modalFilter;
DialogItemIndex itemHit;
+#ifndef ModalDialog
+ PyMac_PRECHECK(ModalDialog);
+#endif
if (!PyArg_ParseTuple(_args, "O",
&modalFilter))
return NULL;
@@ -1009,6 +1149,9 @@
PyObject *_res = NULL;
Boolean _rv;
EventRecord theEvent;
+#ifndef IsDialogEvent
+ PyMac_PRECHECK(IsDialogEvent);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &theEvent))
return NULL;
@@ -1025,6 +1168,9 @@
EventRecord theEvent;
DialogPtr theDialog;
DialogItemIndex itemHit;
+#ifndef DialogSelect
+ PyMac_PRECHECK(DialogSelect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &theEvent))
return NULL;
@@ -1044,6 +1190,9 @@
DialogItemIndex _rv;
SInt16 alertID;
PyObject* modalFilter;
+#ifndef Alert
+ PyMac_PRECHECK(Alert);
+#endif
if (!PyArg_ParseTuple(_args, "hO",
&alertID,
&modalFilter))
@@ -1061,6 +1210,9 @@
DialogItemIndex _rv;
SInt16 alertID;
PyObject* modalFilter;
+#ifndef StopAlert
+ PyMac_PRECHECK(StopAlert);
+#endif
if (!PyArg_ParseTuple(_args, "hO",
&alertID,
&modalFilter))
@@ -1078,6 +1230,9 @@
DialogItemIndex _rv;
SInt16 alertID;
PyObject* modalFilter;
+#ifndef NoteAlert
+ PyMac_PRECHECK(NoteAlert);
+#endif
if (!PyArg_ParseTuple(_args, "hO",
&alertID,
&modalFilter))
@@ -1095,6 +1250,9 @@
DialogItemIndex _rv;
SInt16 alertID;
PyObject* modalFilter;
+#ifndef CautionAlert
+ PyMac_PRECHECK(CautionAlert);
+#endif
if (!PyArg_ParseTuple(_args, "hO",
&alertID,
&modalFilter))
@@ -1113,6 +1271,9 @@
Str255 param1;
Str255 param2;
Str255 param3;
+#ifndef ParamText
+ PyMac_PRECHECK(ParamText);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&O&",
PyMac_GetStr255, param0,
PyMac_GetStr255, param1,
@@ -1133,6 +1294,9 @@
PyObject *_res = NULL;
Handle item;
Str255 text;
+#ifndef GetDialogItemText
+ PyMac_PRECHECK(GetDialogItemText);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &item))
return NULL;
@@ -1148,6 +1312,9 @@
PyObject *_res = NULL;
Handle item;
Str255 text;
+#ifndef SetDialogItemText
+ PyMac_PRECHECK(SetDialogItemText);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
ResObj_Convert, &item,
PyMac_GetStr255, text))
@@ -1163,6 +1330,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetAlertStage
+ PyMac_PRECHECK(GetAlertStage);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetAlertStage();
@@ -1175,6 +1345,9 @@
{
PyObject *_res = NULL;
SInt16 fontNum;
+#ifndef SetDialogFont
+ PyMac_PRECHECK(SetDialogFont);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&fontNum))
return NULL;
@@ -1187,6 +1360,9 @@
static PyObject *Dlg_ResetAlertStage(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ResetAlertStage
+ PyMac_PRECHECK(ResetAlertStage);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ResetAlertStage();
@@ -1204,6 +1380,9 @@
Str255 param1;
Str255 param2;
Str255 param3;
+#ifndef GetParamText
+ PyMac_PRECHECK(GetParamText);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&O&",
PyMac_GetStr255, param0,
PyMac_GetStr255, param1,
@@ -1233,6 +1412,9 @@
SInt32 inRefCon;
Handle inItemListHandle;
UInt32 inFlags;
+#ifndef NewFeaturesDialog
+ PyMac_PRECHECK(NewFeaturesDialog);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&bhO&blO&l",
PyMac_GetRect, &inBoundsRect,
PyMac_GetStr255, inTitle,
@@ -1264,6 +1446,9 @@
PyObject *_res = NULL;
DialogPtr _rv;
WindowPtr window;
+#ifndef GetDialogFromWindow
+ PyMac_PRECHECK(GetDialogFromWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &window))
return NULL;
diff --git a/Mac/Modules/dlg/dlgsupport.py b/Mac/Modules/dlg/dlgsupport.py
index e496eb2..88c19ac 100644
--- a/Mac/Modules/dlg/dlgsupport.py
+++ b/Mac/Modules/dlg/dlgsupport.py
@@ -245,8 +245,8 @@
module.addobject(object)
# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
+Function = OSErrWeakLinkFunctionGenerator
+Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists
functions = []
diff --git a/Mac/Modules/drag/_Dragmodule.c b/Mac/Modules/drag/_Dragmodule.c
index 47ce455..3da0ade 100644
--- a/Mac/Modules/drag/_Dragmodule.c
+++ b/Mac/Modules/drag/_Dragmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -675,7 +671,7 @@
#define DragObj_hash NULL
PyTypeObject DragObj_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"DragObj", /*tp_name*/
sizeof(DragObjObject), /*tp_basicsize*/
diff --git a/Mac/Modules/evt/_Evtmodule.c b/Mac/Modules/evt/_Evtmodule.c
index d282dfe..41c5ee6 100644
--- a/Mac/Modules/evt/_Evtmodule.c
+++ b/Mac/Modules/evt/_Evtmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
diff --git a/Mac/Modules/fm/_Fmmodule.c b/Mac/Modules/fm/_Fmmodule.c
index c5ab18a..9cafebc 100644
--- a/Mac/Modules/fm/_Fmmodule.c
+++ b/Mac/Modules/fm/_Fmmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
diff --git a/Mac/Modules/help/_Helpmodule.c b/Mac/Modules/help/_Helpmodule.c
index f284166..7a2836d 100644
--- a/Mac/Modules/help/_Helpmodule.c
+++ b/Mac/Modules/help/_Helpmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
diff --git a/Mac/Modules/icn/_Icnmodule.c b/Mac/Modules/icn/_Icnmodule.c
index bc27732..a9af768 100644
--- a/Mac/Modules/icn/_Icnmodule.c
+++ b/Mac/Modules/icn/_Icnmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
diff --git a/Mac/Modules/list/_Listmodule.c b/Mac/Modules/list/_Listmodule.c
index d0b19bd..71a8674 100644
--- a/Mac/Modules/list/_Listmodule.c
+++ b/Mac/Modules/list/_Listmodule.c
@@ -647,7 +647,7 @@
#define ListObj_hash NULL
PyTypeObject List_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"List", /*tp_name*/
sizeof(ListObject), /*tp_basicsize*/
diff --git a/Mac/Modules/macconfig.c b/Mac/Modules/macconfig.c
index 5c545b4..f5f78bf 100644
--- a/Mac/Modules/macconfig.c
+++ b/Mac/Modules/macconfig.c
@@ -158,6 +158,9 @@
#ifdef WITH_THREAD
extern void initthread();
#endif
+#ifdef WITH_HOTSHOT
+extern void init_hotshot();
+#endif
#ifdef USE_PYEXPAT
extern void initpyexpat();
#endif
@@ -288,6 +291,9 @@
#ifdef WITH_THREAD
{"thread", initthread},
#endif
+#ifdef WITH_HOTSHOT
+ {"_hotshot", init_hotshot},
+#endif
#ifdef USE_PYEXPAT
{"pyexpat", initpyexpat},
#endif
diff --git a/Mac/Modules/macmodule.c b/Mac/Modules/macmodule.c
index f827d9c..c71d8a9 100644
--- a/Mac/Modules/macmodule.c
+++ b/Mac/Modules/macmodule.c
@@ -114,14 +114,12 @@
char *getbootvol(void);
-static PyObject *MacError; /* Exception mac.error */
-
/* Set a MAC-specific error from errno, and return NULL */
static PyObject *
mac_error()
{
- return PyErr_SetFromErrno(MacError);
+ return PyErr_SetFromErrno(PyExc_OSError);
}
/* MAC generic methods */
@@ -295,8 +293,7 @@
#endif
Py_END_ALLOW_THREADS
if (res == NULL) {
- PyErr_SetString(MacError, path);
- return NULL;
+ return mac_error();
}
return PyString_FromString(res);
}
@@ -839,8 +836,7 @@
return;
/* Initialize mac.error exception */
- MacError = PyErr_NewException("mac.error", NULL, NULL);
- PyDict_SetItemString(d, "error", MacError);
+ PyDict_SetItemString(d, "error", PyExc_OSError);
PyStructSequence_InitType(&StatResultType, &stat_result_desc);
PyDict_SetItemString(d, "stat_result", (PyObject*) &StatResultType);
diff --git a/Mac/Modules/menu/_Menumodule.c b/Mac/Modules/menu/_Menumodule.c
index 2900fd3..f4a2ca8 100644
--- a/Mac/Modules/menu/_Menumodule.c
+++ b/Mac/Modules/menu/_Menumodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -91,6 +87,9 @@
static PyObject *MenuObj_DisposeMenu(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DisposeMenu
+ PyMac_PRECHECK(DisposeMenu);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DisposeMenu(_self->ob_itself);
@@ -102,6 +101,9 @@
static PyObject *MenuObj_CalcMenuSize(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CalcMenuSize
+ PyMac_PRECHECK(CalcMenuSize);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CalcMenuSize(_self->ob_itself);
@@ -114,6 +116,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef CountMenuItems
+ PyMac_PRECHECK(CountMenuItems);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CountMenuItems(_self->ob_itself);
@@ -128,6 +133,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef CountMItems
+ PyMac_PRECHECK(CountMItems);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CountMItems(_self->ob_itself);
@@ -143,6 +151,9 @@
OSStatus _err;
SInt16 outFontID;
UInt16 outFontSize;
+#ifndef GetMenuFont
+ PyMac_PRECHECK(GetMenuFont);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetMenuFont(_self->ob_itself,
@@ -161,6 +172,9 @@
OSStatus _err;
SInt16 inFontID;
UInt16 inFontSize;
+#ifndef SetMenuFont
+ PyMac_PRECHECK(SetMenuFont);
+#endif
if (!PyArg_ParseTuple(_args, "hH",
&inFontID,
&inFontSize))
@@ -178,6 +192,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef GetMenuExcludesMarkColumn
+ PyMac_PRECHECK(GetMenuExcludesMarkColumn);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMenuExcludesMarkColumn(_self->ob_itself);
@@ -191,6 +208,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean excludesMark;
+#ifndef SetMenuExcludesMarkColumn
+ PyMac_PRECHECK(SetMenuExcludesMarkColumn);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&excludesMark))
return NULL;
@@ -206,6 +226,9 @@
{
PyObject *_res = NULL;
Str255 data;
+#ifndef MacAppendMenu
+ PyMac_PRECHECK(MacAppendMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, data))
return NULL;
@@ -221,6 +244,9 @@
PyObject *_res = NULL;
ResType theType;
short afterItem;
+#ifndef InsertResMenu
+ PyMac_PRECHECK(InsertResMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetOSType, &theType,
&afterItem))
@@ -237,6 +263,9 @@
{
PyObject *_res = NULL;
ResType theType;
+#ifndef AppendResMenu
+ PyMac_PRECHECK(AppendResMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetOSType, &theType))
return NULL;
@@ -252,6 +281,9 @@
PyObject *_res = NULL;
Str255 itemString;
short afterItem;
+#ifndef MacInsertMenuItem
+ PyMac_PRECHECK(MacInsertMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetStr255, itemString,
&afterItem))
@@ -268,6 +300,9 @@
{
PyObject *_res = NULL;
short item;
+#ifndef DeleteMenuItem
+ PyMac_PRECHECK(DeleteMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -283,6 +318,9 @@
PyObject *_res = NULL;
short afterItem;
short scriptFilter;
+#ifndef InsertFontResMenu
+ PyMac_PRECHECK(InsertFontResMenu);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&afterItem,
&scriptFilter))
@@ -301,6 +339,9 @@
ResType theType;
short afterItem;
short scriptFilter;
+#ifndef InsertIntlResMenu
+ PyMac_PRECHECK(InsertIntlResMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&hh",
PyMac_GetOSType, &theType,
&afterItem,
@@ -320,6 +361,9 @@
PyObject *_res = NULL;
OSStatus _err;
Str255 inString;
+#ifndef AppendMenuItemText
+ PyMac_PRECHECK(AppendMenuItemText);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, inString))
return NULL;
@@ -337,6 +381,9 @@
OSStatus _err;
Str255 inString;
MenuItemIndex afterItem;
+#ifndef InsertMenuItemText
+ PyMac_PRECHECK(InsertMenuItemText);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetStr255, inString,
&afterItem))
@@ -357,6 +404,9 @@
short top;
short left;
short popUpItem;
+#ifndef PopUpMenuSelect
+ PyMac_PRECHECK(PopUpMenuSelect);
+#endif
if (!PyArg_ParseTuple(_args, "hhh",
&top,
&left,
@@ -375,6 +425,9 @@
{
PyObject *_res = NULL;
MenuID beforeID;
+#ifndef MacInsertMenu
+ PyMac_PRECHECK(MacInsertMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&beforeID))
return NULL;
@@ -390,6 +443,9 @@
PyObject *_res = NULL;
short item;
Boolean checked;
+#ifndef MacCheckMenuItem
+ PyMac_PRECHECK(MacCheckMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&item,
&checked))
@@ -409,6 +465,9 @@
PyObject *_res = NULL;
short item;
Boolean checked;
+#ifndef CheckItem
+ PyMac_PRECHECK(CheckItem);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&item,
&checked))
@@ -427,6 +486,9 @@
PyObject *_res = NULL;
short item;
Str255 itemString;
+#ifndef SetMenuItemText
+ PyMac_PRECHECK(SetMenuItemText);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&item,
PyMac_GetStr255, itemString))
@@ -444,6 +506,9 @@
PyObject *_res = NULL;
short item;
Str255 itemString;
+#ifndef GetMenuItemText
+ PyMac_PRECHECK(GetMenuItemText);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -460,6 +525,9 @@
PyObject *_res = NULL;
short item;
CharParameter markChar;
+#ifndef SetItemMark
+ PyMac_PRECHECK(SetItemMark);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&item,
&markChar))
@@ -477,6 +545,9 @@
PyObject *_res = NULL;
short item;
CharParameter markChar;
+#ifndef GetItemMark
+ PyMac_PRECHECK(GetItemMark);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -493,6 +564,9 @@
PyObject *_res = NULL;
short item;
CharParameter cmdChar;
+#ifndef SetItemCmd
+ PyMac_PRECHECK(SetItemCmd);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&item,
&cmdChar))
@@ -510,6 +584,9 @@
PyObject *_res = NULL;
short item;
CharParameter cmdChar;
+#ifndef GetItemCmd
+ PyMac_PRECHECK(GetItemCmd);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -526,6 +603,9 @@
PyObject *_res = NULL;
short item;
short iconIndex;
+#ifndef SetItemIcon
+ PyMac_PRECHECK(SetItemIcon);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&item,
&iconIndex))
@@ -543,6 +623,9 @@
PyObject *_res = NULL;
short item;
short iconIndex;
+#ifndef GetItemIcon
+ PyMac_PRECHECK(GetItemIcon);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -559,6 +642,9 @@
PyObject *_res = NULL;
short item;
StyleParameter chStyle;
+#ifndef SetItemStyle
+ PyMac_PRECHECK(SetItemStyle);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&item,
&chStyle))
@@ -576,6 +662,9 @@
PyObject *_res = NULL;
short item;
Style chStyle;
+#ifndef GetItemStyle
+ PyMac_PRECHECK(GetItemStyle);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -593,6 +682,9 @@
{
PyObject *_res = NULL;
short item;
+#ifndef DisableItem
+ PyMac_PRECHECK(DisableItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -610,6 +702,9 @@
{
PyObject *_res = NULL;
short item;
+#ifndef EnableItem
+ PyMac_PRECHECK(EnableItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -627,6 +722,9 @@
OSErr _err;
SInt16 inItem;
MenuCommand inCommandID;
+#ifndef SetMenuItemCommandID
+ PyMac_PRECHECK(SetMenuItemCommandID);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&inItem,
&inCommandID))
@@ -646,6 +744,9 @@
OSErr _err;
SInt16 inItem;
MenuCommand outCommandID;
+#ifndef GetMenuItemCommandID
+ PyMac_PRECHECK(GetMenuItemCommandID);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -664,6 +765,9 @@
OSErr _err;
SInt16 inItem;
UInt8 inModifiers;
+#ifndef SetMenuItemModifiers
+ PyMac_PRECHECK(SetMenuItemModifiers);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&inItem,
&inModifiers))
@@ -683,6 +787,9 @@
OSErr _err;
SInt16 inItem;
UInt8 outModifiers;
+#ifndef GetMenuItemModifiers
+ PyMac_PRECHECK(GetMenuItemModifiers);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -702,6 +809,9 @@
SInt16 inItem;
UInt8 inIconType;
Handle inIconHandle;
+#ifndef SetMenuItemIconHandle
+ PyMac_PRECHECK(SetMenuItemIconHandle);
+#endif
if (!PyArg_ParseTuple(_args, "hbO&",
&inItem,
&inIconType,
@@ -724,6 +834,9 @@
SInt16 inItem;
UInt8 outIconType;
Handle outIconHandle;
+#ifndef GetMenuItemIconHandle
+ PyMac_PRECHECK(GetMenuItemIconHandle);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -744,6 +857,9 @@
OSErr _err;
SInt16 inItem;
TextEncoding inScriptID;
+#ifndef SetMenuItemTextEncoding
+ PyMac_PRECHECK(SetMenuItemTextEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&inItem,
&inScriptID))
@@ -763,6 +879,9 @@
OSErr _err;
SInt16 inItem;
TextEncoding outScriptID;
+#ifndef GetMenuItemTextEncoding
+ PyMac_PRECHECK(GetMenuItemTextEncoding);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -781,6 +900,9 @@
OSErr _err;
SInt16 inItem;
MenuID inHierID;
+#ifndef SetMenuItemHierarchicalID
+ PyMac_PRECHECK(SetMenuItemHierarchicalID);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&inItem,
&inHierID))
@@ -800,6 +922,9 @@
OSErr _err;
SInt16 inItem;
MenuID outHierID;
+#ifndef GetMenuItemHierarchicalID
+ PyMac_PRECHECK(GetMenuItemHierarchicalID);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -818,6 +943,9 @@
OSErr _err;
SInt16 inItem;
SInt16 inFontID;
+#ifndef SetMenuItemFontID
+ PyMac_PRECHECK(SetMenuItemFontID);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&inItem,
&inFontID))
@@ -837,6 +965,9 @@
OSErr _err;
SInt16 inItem;
SInt16 outFontID;
+#ifndef GetMenuItemFontID
+ PyMac_PRECHECK(GetMenuItemFontID);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -855,6 +986,9 @@
OSErr _err;
SInt16 inItem;
UInt32 inRefCon;
+#ifndef SetMenuItemRefCon
+ PyMac_PRECHECK(SetMenuItemRefCon);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&inItem,
&inRefCon))
@@ -874,6 +1008,9 @@
OSErr _err;
SInt16 inItem;
UInt32 outRefCon;
+#ifndef GetMenuItemRefCon
+ PyMac_PRECHECK(GetMenuItemRefCon);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -894,6 +1031,9 @@
OSErr _err;
SInt16 inItem;
UInt32 inRefCon2;
+#ifndef SetMenuItemRefCon2
+ PyMac_PRECHECK(SetMenuItemRefCon2);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&inItem,
&inRefCon2))
@@ -916,6 +1056,9 @@
OSErr _err;
SInt16 inItem;
UInt32 outRefCon2;
+#ifndef GetMenuItemRefCon2
+ PyMac_PRECHECK(GetMenuItemRefCon2);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -935,6 +1078,9 @@
OSErr _err;
SInt16 inItem;
SInt16 inGlyph;
+#ifndef SetMenuItemKeyGlyph
+ PyMac_PRECHECK(SetMenuItemKeyGlyph);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&inItem,
&inGlyph))
@@ -954,6 +1100,9 @@
OSErr _err;
SInt16 inItem;
SInt16 outGlyph;
+#ifndef GetMenuItemKeyGlyph
+ PyMac_PRECHECK(GetMenuItemKeyGlyph);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&inItem))
return NULL;
@@ -970,6 +1119,9 @@
{
PyObject *_res = NULL;
MenuItemIndex item;
+#ifndef MacEnableMenuItem
+ PyMac_PRECHECK(MacEnableMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -984,6 +1136,9 @@
{
PyObject *_res = NULL;
MenuItemIndex item;
+#ifndef DisableMenuItem
+ PyMac_PRECHECK(DisableMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -999,6 +1154,9 @@
PyObject *_res = NULL;
Boolean _rv;
MenuItemIndex item;
+#ifndef IsMenuItemEnabled
+ PyMac_PRECHECK(IsMenuItemEnabled);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1013,6 +1171,9 @@
{
PyObject *_res = NULL;
MenuItemIndex item;
+#ifndef EnableMenuItemIcon
+ PyMac_PRECHECK(EnableMenuItemIcon);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1027,6 +1188,9 @@
{
PyObject *_res = NULL;
MenuItemIndex item;
+#ifndef DisableMenuItemIcon
+ PyMac_PRECHECK(DisableMenuItemIcon);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1042,6 +1206,9 @@
PyObject *_res = NULL;
Boolean _rv;
MenuItemIndex item;
+#ifndef IsMenuItemIconEnabled
+ PyMac_PRECHECK(IsMenuItemIconEnabled);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1062,6 +1229,9 @@
OSType propertyCreator;
OSType propertyTag;
UInt32 attributes;
+#ifndef GetMenuItemPropertyAttributes
+ PyMac_PRECHECK(GetMenuItemPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "hO&O&",
&item,
PyMac_GetOSType, &propertyCreator,
@@ -1090,6 +1260,9 @@
OSType propertyTag;
UInt32 attributesToSet;
UInt32 attributesToClear;
+#ifndef ChangeMenuItemPropertyAttributes
+ PyMac_PRECHECK(ChangeMenuItemPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "hO&O&ll",
&item,
PyMac_GetOSType, &propertyCreator,
@@ -1117,6 +1290,9 @@
PyObject *_res = NULL;
OSStatus _err;
MenuAttributes outAttributes;
+#ifndef GetMenuAttributes
+ PyMac_PRECHECK(GetMenuAttributes);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetMenuAttributes(_self->ob_itself,
@@ -1136,6 +1312,9 @@
OSStatus _err;
MenuAttributes setTheseAttributes;
MenuAttributes clearTheseAttributes;
+#ifndef ChangeMenuAttributes
+ PyMac_PRECHECK(ChangeMenuAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&setTheseAttributes,
&clearTheseAttributes))
@@ -1158,6 +1337,9 @@
OSStatus _err;
MenuItemIndex item;
MenuItemAttributes outAttributes;
+#ifndef GetMenuItemAttributes
+ PyMac_PRECHECK(GetMenuItemAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1180,6 +1362,9 @@
MenuItemIndex item;
MenuItemAttributes setTheseAttributes;
MenuItemAttributes clearTheseAttributes;
+#ifndef ChangeMenuItemAttributes
+ PyMac_PRECHECK(ChangeMenuItemAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "hll",
&item,
&setTheseAttributes,
@@ -1201,6 +1386,9 @@
static PyObject *MenuObj_DisableAllMenuItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DisableAllMenuItems
+ PyMac_PRECHECK(DisableAllMenuItems);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DisableAllMenuItems(_self->ob_itself);
@@ -1215,6 +1403,9 @@
static PyObject *MenuObj_EnableAllMenuItems(MenuObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef EnableAllMenuItems
+ PyMac_PRECHECK(EnableAllMenuItems);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
EnableAllMenuItems(_self->ob_itself);
@@ -1230,6 +1421,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef MenuHasEnabledItems
+ PyMac_PRECHECK(MenuHasEnabledItems);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MenuHasEnabledItems(_self->ob_itself);
@@ -1246,6 +1440,9 @@
PyObject *_res = NULL;
ItemCount _rv;
MenuCommand commandID;
+#ifndef CountMenuItemsWithCommandID
+ PyMac_PRECHECK(CountMenuItemsWithCommandID);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&commandID))
return NULL;
@@ -1267,6 +1464,9 @@
UInt32 itemIndex;
MenuHandle outMenu;
MenuItemIndex outIndex;
+#ifndef GetIndMenuItemWithCommandID
+ PyMac_PRECHECK(GetIndMenuItemWithCommandID);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&commandID,
&itemIndex))
@@ -1290,6 +1490,9 @@
{
PyObject *_res = NULL;
MenuCommand commandID;
+#ifndef EnableMenuCommand
+ PyMac_PRECHECK(EnableMenuCommand);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&commandID))
return NULL;
@@ -1307,6 +1510,9 @@
{
PyObject *_res = NULL;
MenuCommand commandID;
+#ifndef DisableMenuCommand
+ PyMac_PRECHECK(DisableMenuCommand);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&commandID))
return NULL;
@@ -1325,6 +1531,9 @@
PyObject *_res = NULL;
Boolean _rv;
MenuCommand commandID;
+#ifndef IsMenuCommandEnabled
+ PyMac_PRECHECK(IsMenuCommandEnabled);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&commandID))
return NULL;
@@ -1346,6 +1555,9 @@
OSType propertyCreator;
OSType propertyTag;
ByteCount size;
+#ifndef GetMenuCommandPropertySize
+ PyMac_PRECHECK(GetMenuCommandPropertySize);
+#endif
if (!PyArg_ParseTuple(_args, "lO&O&",
&commandID,
PyMac_GetOSType, &propertyCreator,
@@ -1372,6 +1584,9 @@
MenuCommand commandID;
OSType propertyCreator;
OSType propertyTag;
+#ifndef RemoveMenuCommandProperty
+ PyMac_PRECHECK(RemoveMenuCommandProperty);
+#endif
if (!PyArg_ParseTuple(_args, "lO&O&",
&commandID,
PyMac_GetOSType, &propertyCreator,
@@ -1398,6 +1613,9 @@
MenuID firstHierMenuID;
OptionBits options;
ItemCount outHierMenuCount;
+#ifndef CreateStandardFontMenu
+ PyMac_PRECHECK(CreateStandardFontMenu);
+#endif
if (!PyArg_ParseTuple(_args, "hhl",
&afterItem,
&firstHierMenuID,
@@ -1422,6 +1640,9 @@
PyObject *_res = NULL;
OSStatus _err;
ItemCount outHierMenuCount;
+#ifndef UpdateStandardFontMenu
+ PyMac_PRECHECK(UpdateStandardFontMenu);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = UpdateStandardFontMenu(_self->ob_itself,
@@ -1442,6 +1663,9 @@
MenuItemIndex item;
FMFontFamily outFontFamily;
FMFontStyle outStyle;
+#ifndef GetFontFamilyFromMenuSelection
+ PyMac_PRECHECK(GetFontFamilyFromMenuSelection);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&item))
return NULL;
@@ -1461,6 +1685,9 @@
{
PyObject *_res = NULL;
MenuID _rv;
+#ifndef GetMenuID
+ PyMac_PRECHECK(GetMenuID);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMenuID(_self->ob_itself);
@@ -1473,6 +1700,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetMenuWidth
+ PyMac_PRECHECK(GetMenuWidth);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMenuWidth(_self->ob_itself);
@@ -1485,6 +1715,9 @@
{
PyObject *_res = NULL;
SInt16 _rv;
+#ifndef GetMenuHeight
+ PyMac_PRECHECK(GetMenuHeight);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMenuHeight(_self->ob_itself);
@@ -1497,6 +1730,9 @@
{
PyObject *_res = NULL;
MenuID menuID;
+#ifndef SetMenuID
+ PyMac_PRECHECK(SetMenuID);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -1511,6 +1747,9 @@
{
PyObject *_res = NULL;
SInt16 width;
+#ifndef SetMenuWidth
+ PyMac_PRECHECK(SetMenuWidth);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&width))
return NULL;
@@ -1525,6 +1764,9 @@
{
PyObject *_res = NULL;
SInt16 height;
+#ifndef SetMenuHeight
+ PyMac_PRECHECK(SetMenuHeight);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&height))
return NULL;
@@ -1539,6 +1781,9 @@
{
PyObject *_res = NULL;
Handle _rv;
+#ifndef as_Resource
+ PyMac_PRECHECK(as_Resource);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = as_Resource(_self->ob_itself);
@@ -1551,6 +1796,9 @@
{
PyObject *_res = NULL;
Str255 data;
+#ifndef AppendMenu
+ PyMac_PRECHECK(AppendMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, data))
return NULL;
@@ -1565,6 +1813,9 @@
{
PyObject *_res = NULL;
short beforeID;
+#ifndef InsertMenu
+ PyMac_PRECHECK(InsertMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&beforeID))
return NULL;
@@ -1580,6 +1831,9 @@
PyObject *_res = NULL;
Str255 itemString;
short afterItem;
+#ifndef InsertMenuItem
+ PyMac_PRECHECK(InsertMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetStr255, itemString,
&afterItem))
@@ -1596,6 +1850,9 @@
{
PyObject *_res = NULL;
UInt16 item;
+#ifndef EnableMenuItem
+ PyMac_PRECHECK(EnableMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "H",
&item))
return NULL;
@@ -1611,6 +1868,9 @@
PyObject *_res = NULL;
short item;
Boolean checked;
+#ifndef CheckMenuItem
+ PyMac_PRECHECK(CheckMenuItem);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&item,
&checked))
@@ -1894,7 +2154,7 @@
#define MenuObj_hash NULL
PyTypeObject Menu_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Menu", /*tp_name*/
sizeof(MenuObject), /*tp_basicsize*/
@@ -1921,6 +2181,9 @@
{
PyObject *_res = NULL;
short resID;
+#ifndef InitProcMenu
+ PyMac_PRECHECK(InitProcMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&resID))
return NULL;
@@ -1936,6 +2199,9 @@
static PyObject *Menu_InitMenus(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef InitMenus
+ PyMac_PRECHECK(InitMenus);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
InitMenus();
@@ -1951,6 +2217,9 @@
MenuHandle _rv;
MenuID menuID;
Str255 menuTitle;
+#ifndef NewMenu
+ PyMac_PRECHECK(NewMenu);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&menuID,
PyMac_GetStr255, menuTitle))
@@ -1967,6 +2236,9 @@
PyObject *_res = NULL;
MenuHandle _rv;
short resourceID;
+#ifndef MacGetMenu
+ PyMac_PRECHECK(MacGetMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&resourceID))
return NULL;
@@ -1985,6 +2257,9 @@
MenuID menuID;
MenuAttributes menuAttributes;
MenuHandle outMenuRef;
+#ifndef CreateNewMenu
+ PyMac_PRECHECK(CreateNewMenu);
+#endif
if (!PyArg_ParseTuple(_args, "hl",
&menuID,
&menuAttributes))
@@ -2004,6 +2279,9 @@
PyObject *_res = NULL;
long _rv;
CharParameter ch;
+#ifndef MenuKey
+ PyMac_PRECHECK(MenuKey);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&ch))
return NULL;
@@ -2018,6 +2296,9 @@
PyObject *_res = NULL;
long _rv;
Point startPt;
+#ifndef MenuSelect
+ PyMac_PRECHECK(MenuSelect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &startPt))
return NULL;
@@ -2031,6 +2312,9 @@
{
PyObject *_res = NULL;
long _rv;
+#ifndef MenuChoice
+ PyMac_PRECHECK(MenuChoice);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MenuChoice();
@@ -2044,6 +2328,9 @@
PyObject *_res = NULL;
UInt32 _rv;
EventRecord inEvent;
+#ifndef MenuEvent
+ PyMac_PRECHECK(MenuEvent);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &inEvent))
return NULL;
@@ -2057,6 +2344,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef GetMBarHeight
+ PyMac_PRECHECK(GetMBarHeight);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMBarHeight();
@@ -2068,6 +2358,9 @@
static PyObject *Menu_MacDrawMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef MacDrawMenuBar
+ PyMac_PRECHECK(MacDrawMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
MacDrawMenuBar();
@@ -2079,6 +2372,9 @@
static PyObject *Menu_InvalMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef InvalMenuBar
+ PyMac_PRECHECK(InvalMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
InvalMenuBar();
@@ -2091,6 +2387,9 @@
{
PyObject *_res = NULL;
MenuID menuID;
+#ifndef HiliteMenu
+ PyMac_PRECHECK(HiliteMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -2105,6 +2404,9 @@
PyObject *_res = NULL;
MenuBarHandle _rv;
short menuBarID;
+#ifndef GetNewMBar
+ PyMac_PRECHECK(GetNewMBar);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuBarID))
return NULL;
@@ -2118,6 +2420,9 @@
{
PyObject *_res = NULL;
MenuBarHandle _rv;
+#ifndef GetMenuBar
+ PyMac_PRECHECK(GetMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetMenuBar();
@@ -2130,6 +2435,9 @@
{
PyObject *_res = NULL;
MenuBarHandle mbar;
+#ifndef SetMenuBar
+ PyMac_PRECHECK(SetMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &mbar))
return NULL;
@@ -2147,6 +2455,9 @@
OSStatus _err;
MenuBarHandle mbar;
MenuBarHandle outBar;
+#ifndef DuplicateMenuBar
+ PyMac_PRECHECK(DuplicateMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &mbar))
return NULL;
@@ -2166,6 +2477,9 @@
PyObject *_res = NULL;
OSStatus _err;
MenuBarHandle mbar;
+#ifndef DisposeMenuBar
+ PyMac_PRECHECK(DisposeMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &mbar))
return NULL;
@@ -2182,6 +2496,9 @@
PyObject *_res = NULL;
MenuHandle _rv;
MenuID menuID;
+#ifndef GetMenuHandle
+ PyMac_PRECHECK(GetMenuHandle);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -2195,6 +2512,9 @@
{
PyObject *_res = NULL;
MenuID menuID;
+#ifndef MacDeleteMenu
+ PyMac_PRECHECK(MacDeleteMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -2207,6 +2527,9 @@
static PyObject *Menu_ClearMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ClearMenuBar
+ PyMac_PRECHECK(ClearMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ClearMenuBar();
@@ -2219,6 +2542,9 @@
{
PyObject *_res = NULL;
short count;
+#ifndef SetMenuFlashCount
+ PyMac_PRECHECK(SetMenuFlashCount);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&count))
return NULL;
@@ -2234,6 +2560,9 @@
{
PyObject *_res = NULL;
short count;
+#ifndef SetMenuFlash
+ PyMac_PRECHECK(SetMenuFlash);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&count))
return NULL;
@@ -2248,6 +2577,9 @@
{
PyObject *_res = NULL;
MenuID menuID;
+#ifndef FlashMenuBar
+ PyMac_PRECHECK(FlashMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -2264,6 +2596,9 @@
PyObject *_res = NULL;
Boolean _rv;
short editCmd;
+#ifndef SystemEdit
+ PyMac_PRECHECK(SystemEdit);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&editCmd))
return NULL;
@@ -2280,6 +2615,9 @@
{
PyObject *_res = NULL;
long menuResult;
+#ifndef SystemMenu
+ PyMac_PRECHECK(SystemMenu);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&menuResult))
return NULL;
@@ -2294,6 +2632,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsMenuBarVisible
+ PyMac_PRECHECK(IsMenuBarVisible);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsMenuBarVisible();
@@ -2305,6 +2646,9 @@
static PyObject *Menu_ShowMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ShowMenuBar
+ PyMac_PRECHECK(ShowMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ShowMenuBar();
@@ -2316,6 +2660,9 @@
static PyObject *Menu_HideMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef HideMenuBar
+ PyMac_PRECHECK(HideMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
HideMenuBar();
@@ -2329,6 +2676,9 @@
PyObject *_res = NULL;
MenuID menuID;
short menuItem;
+#ifndef DeleteMCEntries
+ PyMac_PRECHECK(DeleteMCEntries);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&menuID,
&menuItem))
@@ -2344,6 +2694,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef InitContextualMenus
+ PyMac_PRECHECK(InitContextualMenus);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = InitContextualMenus();
@@ -2358,6 +2711,9 @@
PyObject *_res = NULL;
Boolean _rv;
EventRecord inEvent;
+#ifndef IsShowContextualMenuClick
+ PyMac_PRECHECK(IsShowContextualMenuClick);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &inEvent))
return NULL;
@@ -2373,6 +2729,9 @@
{
PyObject *_res = NULL;
Str255 name;
+#ifndef OpenDeskAcc
+ PyMac_PRECHECK(OpenDeskAcc);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, name))
return NULL;
@@ -2388,6 +2747,9 @@
PyObject *_res = NULL;
MenuHandle _rv;
Handle h;
+#ifndef as_Menu
+ PyMac_PRECHECK(as_Menu);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &h))
return NULL;
@@ -2402,6 +2764,9 @@
PyObject *_res = NULL;
MenuHandle _rv;
short resourceID;
+#ifndef GetMenu
+ PyMac_PRECHECK(GetMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&resourceID))
return NULL;
@@ -2415,6 +2780,9 @@
{
PyObject *_res = NULL;
short menuID;
+#ifndef DeleteMenu
+ PyMac_PRECHECK(DeleteMenu);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&menuID))
return NULL;
@@ -2427,6 +2795,9 @@
static PyObject *Menu_DrawMenuBar(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DrawMenuBar
+ PyMac_PRECHECK(DrawMenuBar);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DrawMenuBar();
diff --git a/Mac/Modules/menu/menusupport.py b/Mac/Modules/menu/menusupport.py
index 199c8af..3157594 100644
--- a/Mac/Modules/menu/menusupport.py
+++ b/Mac/Modules/menu/menusupport.py
@@ -81,8 +81,8 @@
module.addobject(object)
# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
+Function = OSErrWeakLinkFunctionGenerator
+Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists
functions = []
diff --git a/Mac/Modules/mlte/_Mltemodule.c b/Mac/Modules/mlte/_Mltemodule.c
index 7254015..712599e 100644
--- a/Mac/Modules/mlte/_Mltemodule.c
+++ b/Mac/Modules/mlte/_Mltemodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -131,7 +127,9 @@
static PyObject *TXNObj_TXNDeleteObject(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNDeleteObject
PyMac_PRECHECK(TXNDeleteObject);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNDeleteObject(_self->ob_itself);
@@ -146,7 +144,9 @@
UInt32 iWidth;
UInt32 iHeight;
TXNFrameID iTXNFrameID;
+#ifndef TXNResizeFrame
PyMac_PRECHECK(TXNResizeFrame);
+#endif
if (!PyArg_ParseTuple(_args, "lll",
&iWidth,
&iHeight,
@@ -169,7 +169,9 @@
SInt32 iBottom;
SInt32 iRight;
TXNFrameID iTXNFrameID;
+#ifndef TXNSetFrameBounds
PyMac_PRECHECK(TXNSetFrameBounds);
+#endif
if (!PyArg_ParseTuple(_args, "lllll",
&iTop,
&iLeft,
@@ -192,7 +194,9 @@
{
PyObject *_res = NULL;
EventRecord iEvent;
+#ifndef TXNKeyDown
PyMac_PRECHECK(TXNKeyDown);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &iEvent))
return NULL;
@@ -207,7 +211,9 @@
{
PyObject *_res = NULL;
RgnHandle ioCursorRgn;
+#ifndef TXNAdjustCursor
PyMac_PRECHECK(TXNAdjustCursor);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
OptResObj_Convert, &ioCursorRgn))
return NULL;
@@ -222,7 +228,9 @@
{
PyObject *_res = NULL;
EventRecord iEvent;
+#ifndef TXNClick
PyMac_PRECHECK(TXNClick);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &iEvent))
return NULL;
@@ -240,7 +248,9 @@
PyObject *_res = NULL;
Boolean _rv;
EventRecord iEvent;
+#ifndef TXNTSMCheck
PyMac_PRECHECK(TXNTSMCheck);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &iEvent))
return NULL;
@@ -255,7 +265,9 @@
static PyObject *TXNObj_TXNSelectAll(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNSelectAll
PyMac_PRECHECK(TXNSelectAll);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNSelectAll(_self->ob_itself);
@@ -268,7 +280,9 @@
{
PyObject *_res = NULL;
Boolean iBecomingFocused;
+#ifndef TXNFocus
PyMac_PRECHECK(TXNFocus);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&iBecomingFocused))
return NULL;
@@ -282,7 +296,9 @@
static PyObject *TXNObj_TXNUpdate(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNUpdate
PyMac_PRECHECK(TXNUpdate);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNUpdate(_self->ob_itself);
@@ -295,7 +311,9 @@
{
PyObject *_res = NULL;
GWorldPtr iDrawPort;
+#ifndef TXNDraw
PyMac_PRECHECK(TXNDraw);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
OptGWorldObj_Convert, &iDrawPort))
return NULL;
@@ -309,7 +327,9 @@
static PyObject *TXNObj_TXNForceUpdate(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNForceUpdate
PyMac_PRECHECK(TXNForceUpdate);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNForceUpdate(_self->ob_itself);
@@ -322,7 +342,9 @@
{
PyObject *_res = NULL;
UInt32 _rv;
+#ifndef TXNGetSleepTicks
PyMac_PRECHECK(TXNGetSleepTicks);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNGetSleepTicks(_self->ob_itself);
@@ -334,7 +356,9 @@
static PyObject *TXNObj_TXNIdle(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNIdle
PyMac_PRECHECK(TXNIdle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNIdle(_self->ob_itself);
@@ -347,7 +371,9 @@
{
PyObject *_res = NULL;
EventRecord iEvent;
+#ifndef TXNGrowWindow
PyMac_PRECHECK(TXNGrowWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &iEvent))
return NULL;
@@ -362,7 +388,9 @@
{
PyObject *_res = NULL;
short iPart;
+#ifndef TXNZoomWindow
PyMac_PRECHECK(TXNZoomWindow);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&iPart))
return NULL;
@@ -378,7 +406,9 @@
PyObject *_res = NULL;
Boolean _rv;
TXNActionKey oTXNActionKey;
+#ifndef TXNCanUndo
PyMac_PRECHECK(TXNCanUndo);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNCanUndo(_self->ob_itself,
@@ -392,7 +422,9 @@
static PyObject *TXNObj_TXNUndo(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNUndo
PyMac_PRECHECK(TXNUndo);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNUndo(_self->ob_itself);
@@ -406,7 +438,9 @@
PyObject *_res = NULL;
Boolean _rv;
TXNActionKey oTXNActionKey;
+#ifndef TXNCanRedo
PyMac_PRECHECK(TXNCanRedo);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNCanRedo(_self->ob_itself,
@@ -420,7 +454,9 @@
static PyObject *TXNObj_TXNRedo(TXNObjectObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNRedo
PyMac_PRECHECK(TXNRedo);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNRedo(_self->ob_itself);
@@ -433,7 +469,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNCut
PyMac_PRECHECK(TXNCut);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNCut(_self->ob_itself);
@@ -447,7 +485,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNCopy
PyMac_PRECHECK(TXNCopy);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNCopy(_self->ob_itself);
@@ -461,7 +501,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNPaste
PyMac_PRECHECK(TXNPaste);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNPaste(_self->ob_itself);
@@ -475,7 +517,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNClear
PyMac_PRECHECK(TXNClear);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNClear(_self->ob_itself);
@@ -490,7 +534,9 @@
PyObject *_res = NULL;
TXNOffset oStartOffset;
TXNOffset oEndOffset;
+#ifndef TXNGetSelection
PyMac_PRECHECK(TXNGetSelection);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNGetSelection(_self->ob_itself,
@@ -506,7 +552,9 @@
{
PyObject *_res = NULL;
Boolean iShowEnd;
+#ifndef TXNShowSelection
PyMac_PRECHECK(TXNShowSelection);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&iShowEnd))
return NULL;
@@ -521,7 +569,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef TXNIsSelectionEmpty
PyMac_PRECHECK(TXNIsSelectionEmpty);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNIsSelectionEmpty(_self->ob_itself);
@@ -536,7 +586,9 @@
OSStatus _err;
TXNOffset iStartOffset;
TXNOffset iEndOffset;
+#ifndef TXNSetSelection
PyMac_PRECHECK(TXNSetSelection);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&iStartOffset,
&iEndOffset))
@@ -557,7 +609,9 @@
UInt32 iStartOffset;
UInt32 iEndOffset;
ItemCount oRunCount;
+#ifndef TXNCountRunsInRange
PyMac_PRECHECK(TXNCountRunsInRange);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&iStartOffset,
&iEndOffset))
@@ -576,7 +630,9 @@
{
PyObject *_res = NULL;
ByteCount _rv;
+#ifndef TXNDataSize
PyMac_PRECHECK(TXNDataSize);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNDataSize(_self->ob_itself);
@@ -592,7 +648,9 @@
TXNOffset iStartOffset;
TXNOffset iEndOffset;
Handle oDataHandle;
+#ifndef TXNGetData
PyMac_PRECHECK(TXNGetData);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&iStartOffset,
&iEndOffset))
@@ -615,7 +673,9 @@
TXNOffset iEndOffset;
Handle oDataHandle;
TXNDataType iEncoding;
+#ifndef TXNGetDataEncoded
PyMac_PRECHECK(TXNGetDataEncoded);
+#endif
if (!PyArg_ParseTuple(_args, "llO&",
&iStartOffset,
&iEndOffset,
@@ -641,7 +701,9 @@
ByteCount iFileLength;
TXNOffset iStartOffset;
TXNOffset iEndOffset;
+#ifndef TXNSetDataFromFile
PyMac_PRECHECK(TXNSetDataFromFile);
+#endif
if (!PyArg_ParseTuple(_args, "hO&lll",
&iFileRefNum,
PyMac_GetOSType, &iFileType,
@@ -671,7 +733,9 @@
int iDataPtr__in_len__;
TXNOffset iStartOffset;
TXNOffset iEndOffset;
+#ifndef TXNSetData
PyMac_PRECHECK(TXNSetData);
+#endif
if (!PyArg_ParseTuple(_args, "O&s#ll",
PyMac_GetOSType, &iDataType,
&iDataPtr__in__, &iDataPtr__in_len__,
@@ -694,7 +758,9 @@
{
PyObject *_res = NULL;
ItemCount _rv;
+#ifndef TXNGetChangeCount
PyMac_PRECHECK(TXNGetChangeCount);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNGetChangeCount(_self->ob_itself);
@@ -713,7 +779,9 @@
FSSpec iFileSpecification;
SInt16 iDataReference;
SInt16 iResourceReference;
+#ifndef TXNSave
PyMac_PRECHECK(TXNSave);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&lO&hh",
PyMac_GetOSType, &iType,
PyMac_GetOSType, &iResType,
@@ -739,7 +807,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNRevert
PyMac_PRECHECK(TXNRevert);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNRevert(_self->ob_itself);
@@ -753,7 +823,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNPageSetup
PyMac_PRECHECK(TXNPageSetup);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNPageSetup(_self->ob_itself);
@@ -767,7 +839,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNPrint
PyMac_PRECHECK(TXNPrint);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNPrint(_self->ob_itself);
@@ -781,7 +855,9 @@
{
PyObject *_res = NULL;
Rect oViewRect;
+#ifndef TXNGetViewRect
PyMac_PRECHECK(TXNGetViewRect);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNGetViewRect(_self->ob_itself,
@@ -797,7 +873,9 @@
OSStatus _err;
GWorldPtr iWindow;
Boolean iIsActualWindow;
+#ifndef TXNAttachObjectToWindow
PyMac_PRECHECK(TXNAttachObjectToWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&b",
GWorldObj_Convert, &iWindow,
&iIsActualWindow))
@@ -815,7 +893,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef TXNIsObjectAttachedToWindow
PyMac_PRECHECK(TXNIsObjectAttachedToWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNIsObjectAttachedToWindow(_self->ob_itself);
@@ -833,7 +913,9 @@
WindowPtr iWindow;
DragReference iDragReference;
Boolean iDifferentObjectSameWindow;
+#ifndef TXNDragTracker
PyMac_PRECHECK(TXNDragTracker);
+#endif
if (!PyArg_ParseTuple(_args, "lhO&O&b",
&iTXNFrameID,
&iMessage,
@@ -861,7 +943,9 @@
WindowPtr iWindow;
DragReference iDragReference;
Boolean iDifferentObjectSameWindow;
+#ifndef TXNDragReceiver
PyMac_PRECHECK(TXNDragReceiver);
+#endif
if (!PyArg_ParseTuple(_args, "lO&O&b",
&iTXNFrameID,
WinObj_Convert, &iWindow,
@@ -885,7 +969,9 @@
OSStatus _err;
TXNFrameID iTXNFrameID;
TXNScrollBarState iActiveState;
+#ifndef TXNActivate
PyMac_PRECHECK(TXNActivate);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&iTXNFrameID,
&iActiveState))
@@ -906,7 +992,9 @@
TXNFontMenuObject iTXNFontMenuObject;
SInt16 iMenuID;
SInt16 iMenuItem;
+#ifndef TXNDoFontMenuSelection
PyMac_PRECHECK(TXNDoFontMenuSelection);
+#endif
if (!PyArg_ParseTuple(_args, "O&hh",
TXNFontMenuObj_Convert, &iTXNFontMenuObject,
&iMenuID,
@@ -927,7 +1015,9 @@
PyObject *_res = NULL;
OSStatus _err;
TXNFontMenuObject iTXNFontMenuObject;
+#ifndef TXNPrepareFontMenu
PyMac_PRECHECK(TXNPrepareFontMenu);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
TXNFontMenuObj_Convert, &iTXNFontMenuObject))
return NULL;
@@ -1056,7 +1146,7 @@
#define TXNObj_hash NULL
PyTypeObject TXNObject_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"TXNObject", /*tp_name*/
sizeof(TXNObjectObject), /*tp_basicsize*/
@@ -1119,7 +1209,9 @@
PyObject *_res = NULL;
OSStatus _err;
MenuHandle oFontMenuHandle;
+#ifndef TXNGetFontMenuHandle
PyMac_PRECHECK(TXNGetFontMenuHandle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNGetFontMenuHandle(_self->ob_itself,
@@ -1134,7 +1226,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNDisposeFontMenuObject
PyMac_PRECHECK(TXNDisposeFontMenuObject);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNDisposeFontMenuObject(_self->ob_itself);
@@ -1168,7 +1262,7 @@
#define TXNFontMenuObj_hash NULL
PyTypeObject TXNFontMenuObject_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"TXNFontMenuObject", /*tp_name*/
sizeof(TXNFontMenuObjectObject), /*tp_basicsize*/
@@ -1202,7 +1296,9 @@
TXNPermanentTextEncodingType iPermanentEncoding;
TXNObject oTXNObject;
TXNFrameID oTXNFrameID;
+#ifndef TXNNewObject
PyMac_PRECHECK(TXNNewObject);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&llO&l",
OptFSSpecPtr_Convert, &iFileSpec,
WinObj_Convert, &iWindow,
@@ -1232,7 +1328,9 @@
static PyObject *Mlte_TXNTerminateTextension(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef TXNTerminateTextension
PyMac_PRECHECK(TXNTerminateTextension);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
TXNTerminateTextension();
@@ -1245,7 +1343,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef TXNIsScrapPastable
PyMac_PRECHECK(TXNIsScrapPastable);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNIsScrapPastable();
@@ -1258,7 +1358,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNConvertToPublicScrap
PyMac_PRECHECK(TXNConvertToPublicScrap);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNConvertToPublicScrap();
@@ -1272,7 +1374,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef TXNConvertFromPublicScrap
PyMac_PRECHECK(TXNConvertFromPublicScrap);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = TXNConvertFromPublicScrap();
@@ -1290,7 +1394,9 @@
SInt16 iMenuID;
SInt16 iStartHierMenuID;
TXNFontMenuObject oTXNFontMenuObject;
+#ifndef TXNNewFontMenuObject
PyMac_PRECHECK(TXNNewFontMenuObject);
+#endif
if (!PyArg_ParseTuple(_args, "O&hh",
MenuObj_Convert, &iFontMenuHandle,
&iMenuID,
@@ -1311,7 +1417,9 @@
PyObject *_res = NULL;
TXNVersionValue _rv;
TXNFeatureBits oFeatureFlags;
+#ifndef TXNVersionInformation
PyMac_PRECHECK(TXNVersionInformation);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = TXNVersionInformation(&oFeatureFlags);
diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c
index d66fcf2..a753b15 100644
--- a/Mac/Modules/qd/_Qdmodule.c
+++ b/Mac/Modules/qd/_Qdmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -373,7 +369,7 @@
#define GrafObj_hash NULL
PyTypeObject GrafPort_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"GrafPort", /*tp_name*/
sizeof(GrafPortObject), /*tp_basicsize*/
@@ -504,7 +500,7 @@
#define BMObj_hash NULL
PyTypeObject BitMap_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"BitMap", /*tp_name*/
sizeof(BitMapObject), /*tp_basicsize*/
@@ -632,7 +628,7 @@
#define QDGA_hash NULL
staticforward PyTypeObject QDGlobalsAccess_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"QDGlobalsAccess", /*tp_name*/
sizeof(QDGlobalsAccessObject), /*tp_basicsize*/
diff --git a/Mac/Modules/qdoffs/_Qdoffsmodule.c b/Mac/Modules/qdoffs/_Qdoffsmodule.c
index f98e5d9..24c7fc9 100644
--- a/Mac/Modules/qdoffs/_Qdoffsmodule.c
+++ b/Mac/Modules/qdoffs/_Qdoffsmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -138,7 +134,7 @@
#define GWorldObj_hash NULL
PyTypeObject GWorld_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"GWorld", /*tp_name*/
sizeof(GWorldObject), /*tp_basicsize*/
diff --git a/Mac/Modules/qt/_Qtmodule.c b/Mac/Modules/qt/_Qtmodule.c
index bfecbd1..bd387ce 100644
--- a/Mac/Modules/qt/_Qtmodule.c
+++ b/Mac/Modules/qt/_Qtmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -934,7 +930,7 @@
#define MovieCtlObj_hash NULL
PyTypeObject MovieController_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"MovieController", /*tp_name*/
sizeof(MovieControllerObject), /*tp_basicsize*/
@@ -1328,7 +1324,7 @@
#define TimeBaseObj_hash NULL
PyTypeObject TimeBase_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"TimeBase", /*tp_name*/
sizeof(TimeBaseObject), /*tp_basicsize*/
@@ -1605,7 +1601,7 @@
#define UserDataObj_hash NULL
PyTypeObject UserData_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"UserData", /*tp_name*/
sizeof(UserDataObject), /*tp_basicsize*/
@@ -2639,7 +2635,7 @@
#define MediaObj_hash NULL
PyTypeObject Media_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Media", /*tp_name*/
sizeof(MediaObject), /*tp_basicsize*/
@@ -3726,7 +3722,7 @@
#define TrackObj_hash NULL
PyTypeObject Track_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Track", /*tp_name*/
sizeof(TrackObject), /*tp_basicsize*/
@@ -5798,7 +5794,7 @@
#define MovieObj_hash NULL
PyTypeObject Movie_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Movie", /*tp_name*/
sizeof(MovieObject), /*tp_basicsize*/
diff --git a/Mac/Modules/res/_Resmodule.c b/Mac/Modules/res/_Resmodule.c
index 8640f5a..3d59641 100644
--- a/Mac/Modules/res/_Resmodule.c
+++ b/Mac/Modules/res/_Resmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -550,7 +546,7 @@
#define ResObj_hash NULL
PyTypeObject Resource_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Resource", /*tp_name*/
sizeof(ResourceObject), /*tp_basicsize*/
diff --git a/Mac/Modules/snd/_Sndmodule.c b/Mac/Modules/snd/_Sndmodule.c
index cf60a8b..3389436 100644
--- a/Mac/Modules/snd/_Sndmodule.c
+++ b/Mac/Modules/snd/_Sndmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -316,7 +312,7 @@
#define SndCh_hash NULL
staticforward PyTypeObject SndChannel_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"SndChannel", /*tp_name*/
sizeof(SndChannelObject), /*tp_basicsize*/
@@ -444,7 +440,7 @@
#define SPBObj_hash NULL
staticforward PyTypeObject SPB_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"SPB", /*tp_name*/
sizeof(SPBObject), /*tp_basicsize*/
diff --git a/Mac/Modules/te/_TEmodule.c b/Mac/Modules/te/_TEmodule.c
index 90efc8c..2b06484 100644
--- a/Mac/Modules/te/_TEmodule.c
+++ b/Mac/Modules/te/_TEmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -793,7 +789,7 @@
#define TEObj_hash NULL
PyTypeObject TE_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"TE", /*tp_name*/
sizeof(TEObject), /*tp_basicsize*/
diff --git a/Mac/Modules/waste/wastemodule.c b/Mac/Modules/waste/wastemodule.c
index 2c28310..921f297 100644
--- a/Mac/Modules/waste/wastemodule.c
+++ b/Mac/Modules/waste/wastemodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -348,7 +344,7 @@
#define WEOObj_hash NULL
PyTypeObject WEO_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"WEO", /*tp_name*/
sizeof(WEOObject), /*tp_basicsize*/
@@ -1713,7 +1709,7 @@
#define wasteObj_hash NULL
PyTypeObject waste_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"waste", /*tp_name*/
sizeof(wasteObject), /*tp_basicsize*/
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c
index 623782d..8dc9fad 100644
--- a/Mac/Modules/win/_Winmodule.c
+++ b/Mac/Modules/win/_Winmodule.c
@@ -5,12 +5,8 @@
-#ifdef _WIN32
-#include "pywintoolbox.h"
-#else
#include "macglue.h"
#include "pymactoolbox.h"
-#endif
/* Macro to test whether a weak-loaded CFM function exists */
#define PyMac_PRECHECK(rtn) do { if ( &rtn == NULL ) {\
@@ -36,7 +32,7 @@
#define WinObj_Convert _WinObj_Convert
#endif
-#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
+#if !ACCESSOR_CALLS_ARE_FUNCTIONS && UNIVERSAL_INTERFACES_VERSION < 0x340
/* Carbon calls that we emulate in classic mode */
#define GetWindowSpareFlag(win) (((CWindowPeek)(win))->spareFlag)
#define GetWindowFromPort(port) ((WindowRef)(port))
@@ -128,6 +124,9 @@
PyObject *_res = NULL;
OSStatus _err;
UInt32 outCount;
+#ifndef GetWindowOwnerCount
+ PyMac_PRECHECK(GetWindowOwnerCount);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowOwnerCount(_self->ob_itself,
@@ -142,6 +141,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef CloneWindow
+ PyMac_PRECHECK(CloneWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = CloneWindow(_self->ob_itself);
@@ -157,6 +159,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef ReshapeCustomWindow
+ PyMac_PRECHECK(ReshapeCustomWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = ReshapeCustomWindow(_self->ob_itself);
@@ -172,6 +177,9 @@
PyObject *_res = NULL;
OSStatus _err;
WindowClass outClass;
+#ifndef GetWindowClass
+ PyMac_PRECHECK(GetWindowClass);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowClass(_self->ob_itself,
@@ -187,6 +195,9 @@
PyObject *_res = NULL;
OSStatus _err;
WindowAttributes outAttributes;
+#ifndef GetWindowAttributes
+ PyMac_PRECHECK(GetWindowAttributes);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowAttributes(_self->ob_itself,
@@ -205,6 +216,9 @@
OSStatus _err;
WindowAttributes setTheseAttributes;
WindowAttributes clearTheseAttributes;
+#ifndef ChangeWindowAttributes
+ PyMac_PRECHECK(ChangeWindowAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "ll",
&setTheseAttributes,
&clearTheseAttributes))
@@ -225,6 +239,9 @@
{
PyObject *_res = NULL;
WCTabHandle newColorTable;
+#ifndef SetWinColor
+ PyMac_PRECHECK(SetWinColor);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &newColorTable))
return NULL;
@@ -241,6 +258,9 @@
PyObject *_res = NULL;
OSStatus _err;
RGBColor color;
+#ifndef SetWindowContentColor
+ PyMac_PRECHECK(SetWindowContentColor);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
QdRGB_Convert, &color))
return NULL;
@@ -257,6 +277,9 @@
PyObject *_res = NULL;
OSStatus _err;
RGBColor color;
+#ifndef GetWindowContentColor
+ PyMac_PRECHECK(GetWindowContentColor);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowContentColor(_self->ob_itself,
@@ -272,6 +295,9 @@
PyObject *_res = NULL;
OSStatus _err;
PixPatHandle outPixPat;
+#ifndef GetWindowContentPattern
+ PyMac_PRECHECK(GetWindowContentPattern);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &outPixPat))
return NULL;
@@ -288,6 +314,9 @@
PyObject *_res = NULL;
OSStatus _err;
PixPatHandle pixPat;
+#ifndef SetWindowContentPattern
+ PyMac_PRECHECK(SetWindowContentPattern);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &pixPat))
return NULL;
@@ -310,6 +339,9 @@
SInt16 inVPixels;
ScrollWindowOptions inOptions;
RgnHandle outExposedRgn;
+#ifndef ScrollWindowRect
+ PyMac_PRECHECK(ScrollWindowRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&hhlO&",
PyMac_GetRect, &inScrollRect,
&inHPixels,
@@ -341,6 +373,9 @@
SInt16 inVPixels;
ScrollWindowOptions inOptions;
RgnHandle outExposedRgn;
+#ifndef ScrollWindowRegion
+ PyMac_PRECHECK(ScrollWindowRegion);
+#endif
if (!PyArg_ParseTuple(_args, "O&hhlO&",
ResObj_Convert, &inScrollRgn,
&inHPixels,
@@ -364,6 +399,9 @@
static PyObject *WinObj_ClipAbove(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ClipAbove
+ PyMac_PRECHECK(ClipAbove);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ClipAbove(_self->ob_itself);
@@ -377,6 +415,9 @@
static PyObject *WinObj_SaveOld(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef SaveOld
+ PyMac_PRECHECK(SaveOld);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
SaveOld(_self->ob_itself);
@@ -392,6 +433,9 @@
{
PyObject *_res = NULL;
Boolean update;
+#ifndef DrawNew
+ PyMac_PRECHECK(DrawNew);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&update))
return NULL;
@@ -407,6 +451,9 @@
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
+#ifndef PaintOne
+ PyMac_PRECHECK(PaintOne);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
@@ -421,6 +468,9 @@
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
+#ifndef PaintBehind
+ PyMac_PRECHECK(PaintBehind);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
@@ -434,6 +484,9 @@
static PyObject *WinObj_CalcVis(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CalcVis
+ PyMac_PRECHECK(CalcVis);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CalcVis(_self->ob_itself);
@@ -446,6 +499,9 @@
{
PyObject *_res = NULL;
RgnHandle clobberedRgn;
+#ifndef CalcVisBehind
+ PyMac_PRECHECK(CalcVisBehind);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &clobberedRgn))
return NULL;
@@ -459,6 +515,9 @@
static PyObject *WinObj_BringToFront(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef BringToFront
+ PyMac_PRECHECK(BringToFront);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
BringToFront(_self->ob_itself);
@@ -471,6 +530,9 @@
{
PyObject *_res = NULL;
WindowPtr behindWindow;
+#ifndef SendBehind
+ PyMac_PRECHECK(SendBehind);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
WinObj_Convert, &behindWindow))
return NULL;
@@ -484,6 +546,9 @@
static PyObject *WinObj_SelectWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef SelectWindow
+ PyMac_PRECHECK(SelectWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
SelectWindow(_self->ob_itself);
@@ -500,6 +565,9 @@
WindowPtr _rv;
WindowClass inWindowClass;
Boolean mustBeVisible;
+#ifndef GetNextWindowOfClass
+ PyMac_PRECHECK(GetNextWindowOfClass);
+#endif
if (!PyArg_ParseTuple(_args, "lb",
&inWindowClass,
&mustBeVisible))
@@ -519,6 +587,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsValidWindowPtr
+ PyMac_PRECHECK(IsValidWindowPtr);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsValidWindowPtr(_self->ob_itself);
@@ -532,6 +603,9 @@
{
PyObject *_res = NULL;
Boolean fHilite;
+#ifndef HiliteWindow
+ PyMac_PRECHECK(HiliteWindow);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&fHilite))
return NULL;
@@ -546,6 +620,9 @@
{
PyObject *_res = NULL;
long data;
+#ifndef SetWRefCon
+ PyMac_PRECHECK(SetWRefCon);
+#endif
if (!PyArg_ParseTuple(_args, "l",
&data))
return NULL;
@@ -560,6 +637,9 @@
{
PyObject *_res = NULL;
long _rv;
+#ifndef GetWRefCon
+ PyMac_PRECHECK(GetWRefCon);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWRefCon(_self->ob_itself);
@@ -572,6 +652,9 @@
{
PyObject *_res = NULL;
PicHandle pic;
+#ifndef SetWindowPic
+ PyMac_PRECHECK(SetWindowPic);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &pic))
return NULL;
@@ -586,6 +669,9 @@
{
PyObject *_res = NULL;
PicHandle _rv;
+#ifndef GetWindowPic
+ PyMac_PRECHECK(GetWindowPic);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowPic(_self->ob_itself);
@@ -598,6 +684,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef GetWVariant
+ PyMac_PRECHECK(GetWVariant);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWVariant(_self->ob_itself);
@@ -611,6 +700,9 @@
PyObject *_res = NULL;
OSStatus _err;
UInt32 outFeatures;
+#ifndef GetWindowFeatures
+ PyMac_PRECHECK(GetWindowFeatures);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowFeatures(_self->ob_itself,
@@ -627,6 +719,9 @@
OSStatus _err;
WindowRegionCode inRegionCode;
RgnHandle ioWinRgn;
+#ifndef GetWindowRegion
+ PyMac_PRECHECK(GetWindowRegion);
+#endif
if (!PyArg_ParseTuple(_args, "HO&",
&inRegionCode,
ResObj_Convert, &ioWinRgn))
@@ -643,6 +738,9 @@
static PyObject *WinObj_BeginUpdate(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef BeginUpdate
+ PyMac_PRECHECK(BeginUpdate);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
BeginUpdate(_self->ob_itself);
@@ -654,6 +752,9 @@
static PyObject *WinObj_EndUpdate(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef EndUpdate
+ PyMac_PRECHECK(EndUpdate);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
EndUpdate(_self->ob_itself);
@@ -667,6 +768,9 @@
PyObject *_res = NULL;
OSStatus _err;
RgnHandle region;
+#ifndef InvalWindowRgn
+ PyMac_PRECHECK(InvalWindowRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, ®ion))
return NULL;
@@ -683,6 +787,9 @@
PyObject *_res = NULL;
OSStatus _err;
Rect bounds;
+#ifndef InvalWindowRect
+ PyMac_PRECHECK(InvalWindowRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &bounds))
return NULL;
@@ -699,6 +806,9 @@
PyObject *_res = NULL;
OSStatus _err;
RgnHandle region;
+#ifndef ValidWindowRgn
+ PyMac_PRECHECK(ValidWindowRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, ®ion))
return NULL;
@@ -715,6 +825,9 @@
PyObject *_res = NULL;
OSStatus _err;
Rect bounds;
+#ifndef ValidWindowRect
+ PyMac_PRECHECK(ValidWindowRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &bounds))
return NULL;
@@ -729,6 +842,9 @@
static PyObject *WinObj_DrawGrowIcon(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef DrawGrowIcon
+ PyMac_PRECHECK(DrawGrowIcon);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
DrawGrowIcon(_self->ob_itself);
@@ -741,6 +857,9 @@
{
PyObject *_res = NULL;
Str255 title;
+#ifndef SetWTitle
+ PyMac_PRECHECK(SetWTitle);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetStr255, title))
return NULL;
@@ -755,6 +874,9 @@
{
PyObject *_res = NULL;
Str255 title;
+#ifndef GetWTitle
+ PyMac_PRECHECK(GetWTitle);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWTitle(_self->ob_itself,
@@ -769,6 +891,9 @@
PyObject *_res = NULL;
OSStatus _err;
FSSpec inFile;
+#ifndef SetWindowProxyFSSpec
+ PyMac_PRECHECK(SetWindowProxyFSSpec);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetFSSpec, &inFile))
return NULL;
@@ -785,6 +910,9 @@
PyObject *_res = NULL;
OSStatus _err;
FSSpec outFile;
+#ifndef GetWindowProxyFSSpec
+ PyMac_PRECHECK(GetWindowProxyFSSpec);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowProxyFSSpec(_self->ob_itself,
@@ -800,6 +928,9 @@
PyObject *_res = NULL;
OSStatus _err;
AliasHandle alias;
+#ifndef SetWindowProxyAlias
+ PyMac_PRECHECK(SetWindowProxyAlias);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &alias))
return NULL;
@@ -816,6 +947,9 @@
PyObject *_res = NULL;
OSStatus _err;
AliasHandle alias;
+#ifndef GetWindowProxyAlias
+ PyMac_PRECHECK(GetWindowProxyAlias);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowProxyAlias(_self->ob_itself,
@@ -833,6 +967,9 @@
OSType fileCreator;
OSType fileType;
SInt16 vRefNum;
+#ifndef SetWindowProxyCreatorAndType
+ PyMac_PRECHECK(SetWindowProxyCreatorAndType);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&h",
PyMac_GetOSType, &fileCreator,
PyMac_GetOSType, &fileType,
@@ -853,6 +990,9 @@
PyObject *_res = NULL;
OSStatus _err;
IconRef outIcon;
+#ifndef GetWindowProxyIcon
+ PyMac_PRECHECK(GetWindowProxyIcon);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowProxyIcon(_self->ob_itself,
@@ -868,6 +1008,9 @@
PyObject *_res = NULL;
OSStatus _err;
IconRef icon;
+#ifndef SetWindowProxyIcon
+ PyMac_PRECHECK(SetWindowProxyIcon);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &icon))
return NULL;
@@ -883,6 +1026,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef RemoveWindowProxy
+ PyMac_PRECHECK(RemoveWindowProxy);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = RemoveWindowProxy(_self->ob_itself);
@@ -898,6 +1044,9 @@
OSStatus _err;
DragReference outNewDrag;
RgnHandle outDragOutlineRgn;
+#ifndef BeginWindowProxyDrag
+ PyMac_PRECHECK(BeginWindowProxyDrag);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &outDragOutlineRgn))
return NULL;
@@ -915,6 +1064,9 @@
PyObject *_res = NULL;
OSStatus _err;
DragReference theDrag;
+#ifndef EndWindowProxyDrag
+ PyMac_PRECHECK(EndWindowProxyDrag);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
DragObj_Convert, &theDrag))
return NULL;
@@ -933,6 +1085,9 @@
Point startPt;
DragReference drag;
RgnHandle inDragOutlineRgn;
+#ifndef TrackWindowProxyFromExistingDrag
+ PyMac_PRECHECK(TrackWindowProxyFromExistingDrag);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&O&",
PyMac_GetPoint, &startPt,
DragObj_Convert, &drag,
@@ -953,6 +1108,9 @@
PyObject *_res = NULL;
OSStatus _err;
Point startPt;
+#ifndef TrackWindowProxyDrag
+ PyMac_PRECHECK(TrackWindowProxyDrag);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &startPt))
return NULL;
@@ -968,6 +1126,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowModified
+ PyMac_PRECHECK(IsWindowModified);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowModified(_self->ob_itself);
@@ -981,6 +1142,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean modified;
+#ifndef SetWindowModified
+ PyMac_PRECHECK(SetWindowModified);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&modified))
return NULL;
@@ -997,6 +1161,9 @@
PyObject *_res = NULL;
Boolean _rv;
EventRecord event;
+#ifndef IsWindowPathSelectClick
+ PyMac_PRECHECK(IsWindowPathSelectClick);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetEventRecord, &event))
return NULL;
@@ -1013,6 +1180,9 @@
OSStatus _err;
MenuHandle menu;
SInt32 outMenuResult;
+#ifndef WindowPathSelect
+ PyMac_PRECHECK(WindowPathSelect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
MenuObj_Convert, &menu))
return NULL;
@@ -1030,6 +1200,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean hilited;
+#ifndef HiliteWindowFrameForDrag
+ PyMac_PRECHECK(HiliteWindowFrameForDrag);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&hilited))
return NULL;
@@ -1048,6 +1221,9 @@
WindowTransitionEffect effect;
WindowTransitionAction action;
Rect rect;
+#ifndef TransitionWindow
+ PyMac_PRECHECK(TransitionWindow);
+#endif
if (!PyArg_ParseTuple(_args, "llO&",
&effect,
&action,
@@ -1069,6 +1245,9 @@
short hGlobal;
short vGlobal;
Boolean front;
+#ifndef MacMoveWindow
+ PyMac_PRECHECK(MacMoveWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hhb",
&hGlobal,
&vGlobal,
@@ -1089,6 +1268,9 @@
short w;
short h;
Boolean fUpdate;
+#ifndef SizeWindow
+ PyMac_PRECHECK(SizeWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hhb",
&w,
&h,
@@ -1109,6 +1291,9 @@
long _rv;
Point startPt;
Rect bBox;
+#ifndef GrowWindow
+ PyMac_PRECHECK(GrowWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetPoint, &startPt,
PyMac_GetRect, &bBox))
@@ -1126,6 +1311,9 @@
PyObject *_res = NULL;
Point startPt;
Rect boundsRect;
+#ifndef DragWindow
+ PyMac_PRECHECK(DragWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetPoint, &startPt,
PyMac_GetRect, &boundsRect))
@@ -1143,6 +1331,9 @@
PyObject *_res = NULL;
WindowPartCode partCode;
Boolean front;
+#ifndef ZoomWindow
+ PyMac_PRECHECK(ZoomWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hb",
&partCode,
&front))
@@ -1159,6 +1350,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowCollapsable
+ PyMac_PRECHECK(IsWindowCollapsable);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowCollapsable(_self->ob_itself);
@@ -1171,6 +1365,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowCollapsed
+ PyMac_PRECHECK(IsWindowCollapsed);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowCollapsed(_self->ob_itself);
@@ -1184,6 +1381,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean collapse;
+#ifndef CollapseWindow
+ PyMac_PRECHECK(CollapseWindow);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&collapse))
return NULL;
@@ -1201,6 +1401,9 @@
OSStatus _err;
WindowRegionCode regionCode;
Rect globalBounds;
+#ifndef GetWindowBounds
+ PyMac_PRECHECK(GetWindowBounds);
+#endif
if (!PyArg_ParseTuple(_args, "H",
®ionCode))
return NULL;
@@ -1220,6 +1423,9 @@
Point startPoint;
Rect sizeConstraints;
Rect newContentRect;
+#ifndef ResizeWindow
+ PyMac_PRECHECK(ResizeWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetPoint, &startPoint,
PyMac_GetRect, &sizeConstraints))
@@ -1240,6 +1446,9 @@
OSStatus _err;
WindowRegionCode regionCode;
Rect globalBounds;
+#ifndef SetWindowBounds
+ PyMac_PRECHECK(SetWindowBounds);
+#endif
if (!PyArg_ParseTuple(_args, "HO&",
®ionCode,
PyMac_GetRect, &globalBounds))
@@ -1259,6 +1468,9 @@
OSStatus _err;
WindowPtr parentWindow;
WindowPositionMethod method;
+#ifndef RepositionWindow
+ PyMac_PRECHECK(RepositionWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
WinObj_Convert, &parentWindow,
&method))
@@ -1278,6 +1490,9 @@
OSStatus _err;
short hGlobal;
short vGlobal;
+#ifndef MoveWindowStructure
+ PyMac_PRECHECK(MoveWindowStructure);
+#endif
if (!PyArg_ParseTuple(_args, "hh",
&hGlobal,
&vGlobal))
@@ -1297,6 +1512,9 @@
Boolean _rv;
Point idealSize;
Rect idealStandardState;
+#ifndef IsWindowInStandardState
+ PyMac_PRECHECK(IsWindowInStandardState);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowInStandardState(_self->ob_itself,
@@ -1315,6 +1533,9 @@
OSStatus _err;
WindowPartCode partCode;
Point ioIdealSize;
+#ifndef ZoomWindowIdeal
+ PyMac_PRECHECK(ZoomWindowIdeal);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&partCode))
return NULL;
@@ -1332,6 +1553,9 @@
PyObject *_res = NULL;
OSStatus _err;
Rect userState;
+#ifndef GetWindowIdealUserState
+ PyMac_PRECHECK(GetWindowIdealUserState);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = GetWindowIdealUserState(_self->ob_itself,
@@ -1347,6 +1571,9 @@
PyObject *_res = NULL;
OSStatus _err;
Rect userState;
+#ifndef SetWindowIdealUserState
+ PyMac_PRECHECK(SetWindowIdealUserState);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = SetWindowIdealUserState(_self->ob_itself,
@@ -1360,6 +1587,9 @@
static PyObject *WinObj_HideWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef HideWindow
+ PyMac_PRECHECK(HideWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
HideWindow(_self->ob_itself);
@@ -1371,6 +1601,9 @@
static PyObject *WinObj_MacShowWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef MacShowWindow
+ PyMac_PRECHECK(MacShowWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
MacShowWindow(_self->ob_itself);
@@ -1383,6 +1616,9 @@
{
PyObject *_res = NULL;
Boolean showFlag;
+#ifndef ShowHide
+ PyMac_PRECHECK(ShowHide);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&showFlag))
return NULL;
@@ -1402,6 +1638,9 @@
OSType propertyCreator;
OSType propertyTag;
UInt32 attributes;
+#ifndef GetWindowPropertyAttributes
+ PyMac_PRECHECK(GetWindowPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetOSType, &propertyCreator,
PyMac_GetOSType, &propertyTag))
@@ -1427,6 +1666,9 @@
OSType propertyTag;
UInt32 attributesToSet;
UInt32 attributesToClear;
+#ifndef ChangeWindowPropertyAttributes
+ PyMac_PRECHECK(ChangeWindowPropertyAttributes);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&ll",
PyMac_GetOSType, &propertyCreator,
PyMac_GetOSType, &propertyTag,
@@ -1451,6 +1693,9 @@
Boolean _rv;
Point thePt;
WindowPartCode partCode;
+#ifndef TrackBox
+ PyMac_PRECHECK(TrackBox);
+#endif
if (!PyArg_ParseTuple(_args, "O&h",
PyMac_GetPoint, &thePt,
&partCode))
@@ -1468,6 +1713,9 @@
PyObject *_res = NULL;
Boolean _rv;
Point thePt;
+#ifndef TrackGoAway
+ PyMac_PRECHECK(TrackGoAway);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePt))
return NULL;
@@ -1485,6 +1733,9 @@
PyObject *_res = NULL;
Boolean _rv;
AuxWinHandle awHndl;
+#ifndef GetAuxWin
+ PyMac_PRECHECK(GetAuxWin);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetAuxWin(_self->ob_itself,
@@ -1502,6 +1753,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef GetWindowGoAwayFlag
+ PyMac_PRECHECK(GetWindowGoAwayFlag);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowGoAwayFlag(_self->ob_itself);
@@ -1517,6 +1771,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef GetWindowSpareFlag
+ PyMac_PRECHECK(GetWindowSpareFlag);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowSpareFlag(_self->ob_itself);
@@ -1530,6 +1787,9 @@
{
PyObject *_res = NULL;
CGrafPtr _rv;
+#ifndef GetWindowPort
+ PyMac_PRECHECK(GetWindowPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowPort(_self->ob_itself);
@@ -1542,6 +1802,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef GetWindowKind
+ PyMac_PRECHECK(GetWindowKind);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowKind(_self->ob_itself);
@@ -1554,6 +1817,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef MacIsWindowVisible
+ PyMac_PRECHECK(MacIsWindowVisible);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MacIsWindowVisible(_self->ob_itself);
@@ -1566,6 +1832,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowHilited
+ PyMac_PRECHECK(IsWindowHilited);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowHilited(_self->ob_itself);
@@ -1580,6 +1849,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowUpdatePending
+ PyMac_PRECHECK(IsWindowUpdatePending);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowUpdatePending(_self->ob_itself);
@@ -1593,6 +1865,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef MacGetNextWindow
+ PyMac_PRECHECK(MacGetNextWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = MacGetNextWindow(_self->ob_itself);
@@ -1605,6 +1880,9 @@
{
PyObject *_res = NULL;
Rect rect;
+#ifndef GetWindowStandardState
+ PyMac_PRECHECK(GetWindowStandardState);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWindowStandardState(_self->ob_itself,
@@ -1618,6 +1896,9 @@
{
PyObject *_res = NULL;
Rect rect;
+#ifndef GetWindowUserState
+ PyMac_PRECHECK(GetWindowUserState);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWindowUserState(_self->ob_itself,
@@ -1631,6 +1912,9 @@
{
PyObject *_res = NULL;
short kind;
+#ifndef SetWindowKind
+ PyMac_PRECHECK(SetWindowKind);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&kind))
return NULL;
@@ -1645,6 +1929,9 @@
{
PyObject *_res = NULL;
Rect rect;
+#ifndef SetWindowStandardState
+ PyMac_PRECHECK(SetWindowStandardState);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &rect))
return NULL;
@@ -1659,6 +1946,9 @@
{
PyObject *_res = NULL;
Rect rect;
+#ifndef SetWindowUserState
+ PyMac_PRECHECK(SetWindowUserState);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &rect))
return NULL;
@@ -1672,6 +1962,9 @@
static PyObject *WinObj_SetPortWindowPort(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef SetPortWindowPort
+ PyMac_PRECHECK(SetPortWindowPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
SetPortWindowPort(_self->ob_itself);
@@ -1684,6 +1977,9 @@
{
PyObject *_res = NULL;
Rect bounds;
+#ifndef GetWindowPortBounds
+ PyMac_PRECHECK(GetWindowPortBounds);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWindowPortBounds(_self->ob_itself,
@@ -1697,6 +1993,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef IsWindowVisible
+ PyMac_PRECHECK(IsWindowVisible);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = IsWindowVisible(_self->ob_itself);
@@ -1711,6 +2010,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef GetWindowZoomFlag
+ PyMac_PRECHECK(GetWindowZoomFlag);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowZoomFlag(_self->ob_itself);
@@ -1724,6 +2026,9 @@
{
PyObject *_res = NULL;
RgnHandle r;
+#ifndef GetWindowStructureRgn
+ PyMac_PRECHECK(GetWindowStructureRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
@@ -1738,6 +2043,9 @@
{
PyObject *_res = NULL;
RgnHandle r;
+#ifndef GetWindowContentRgn
+ PyMac_PRECHECK(GetWindowContentRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
@@ -1752,6 +2060,9 @@
{
PyObject *_res = NULL;
RgnHandle r;
+#ifndef GetWindowUpdateRgn
+ PyMac_PRECHECK(GetWindowUpdateRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &r))
return NULL;
@@ -1768,6 +2079,9 @@
{
PyObject *_res = NULL;
short _rv;
+#ifndef GetWindowTitleWidth
+ PyMac_PRECHECK(GetWindowTitleWidth);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetWindowTitleWidth(_self->ob_itself);
@@ -1781,6 +2095,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef GetNextWindow
+ PyMac_PRECHECK(GetNextWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetNextWindow(_self->ob_itself);
@@ -1794,6 +2111,9 @@
static PyObject *WinObj_CloseWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef CloseWindow
+ PyMac_PRECHECK(CloseWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
CloseWindow(_self->ob_itself);
@@ -1809,6 +2129,9 @@
short hGlobal;
short vGlobal;
Boolean front;
+#ifndef MoveWindow
+ PyMac_PRECHECK(MoveWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hhb",
&hGlobal,
&vGlobal,
@@ -1826,6 +2149,9 @@
static PyObject *WinObj_ShowWindow(WindowObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef ShowWindow
+ PyMac_PRECHECK(ShowWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
ShowWindow(_self->ob_itself);
@@ -2141,7 +2467,7 @@
}
PyTypeObject Window_Type = {
- PyObject_HEAD_INIT(&PyType_Type)
+ PyObject_HEAD_INIT(NULL)
0, /*ob_size*/
"Window", /*tp_name*/
sizeof(WindowObject), /*tp_basicsize*/
@@ -2168,6 +2494,9 @@
WindowPtr _rv;
short windowID;
WindowPtr behind;
+#ifndef GetNewCWindow
+ PyMac_PRECHECK(GetNewCWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&windowID,
WinObj_Convert, &behind))
@@ -2191,6 +2520,9 @@
WindowPtr behind;
Boolean goAwayFlag;
long refCon;
+#ifndef NewWindow
+ PyMac_PRECHECK(NewWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
PyMac_GetRect, &boundsRect,
PyMac_GetStr255, title,
@@ -2219,6 +2551,9 @@
WindowPtr _rv;
short windowID;
WindowPtr behind;
+#ifndef GetNewWindow
+ PyMac_PRECHECK(GetNewWindow);
+#endif
if (!PyArg_ParseTuple(_args, "hO&",
&windowID,
WinObj_Convert, &behind))
@@ -2242,6 +2577,9 @@
WindowPtr behind;
Boolean goAwayFlag;
long refCon;
+#ifndef NewCWindow
+ PyMac_PRECHECK(NewCWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&bhO&bl",
PyMac_GetRect, &boundsRect,
PyMac_GetStr255, title,
@@ -2272,6 +2610,9 @@
WindowAttributes attributes;
Rect contentBounds;
WindowPtr outWindow;
+#ifndef CreateNewWindow
+ PyMac_PRECHECK(CreateNewWindow);
+#endif
if (!PyArg_ParseTuple(_args, "llO&",
&windowClass,
&attributes,
@@ -2293,6 +2634,9 @@
OSStatus _err;
SInt16 resID;
WindowPtr outWindow;
+#ifndef CreateWindowFromResource
+ PyMac_PRECHECK(CreateWindowFromResource);
+#endif
if (!PyArg_ParseTuple(_args, "h",
&resID))
return NULL;
@@ -2308,6 +2652,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef ShowFloatingWindows
+ PyMac_PRECHECK(ShowFloatingWindows);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = ShowFloatingWindows();
@@ -2321,6 +2668,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef HideFloatingWindows
+ PyMac_PRECHECK(HideFloatingWindows);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = HideFloatingWindows();
@@ -2334,6 +2684,9 @@
{
PyObject *_res = NULL;
Boolean _rv;
+#ifndef AreFloatingWindowsVisible
+ PyMac_PRECHECK(AreFloatingWindowsVisible);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = AreFloatingWindowsVisible();
@@ -2348,6 +2701,9 @@
{
PyObject *_res = NULL;
PixPatHandle deskPixPat;
+#ifndef SetDeskCPat
+ PyMac_PRECHECK(SetDeskCPat);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &deskPixPat))
return NULL;
@@ -2363,6 +2719,9 @@
PyObject *_res = NULL;
Boolean _rv;
EventRecord theEvent;
+#ifndef CheckUpdate
+ PyMac_PRECHECK(CheckUpdate);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = CheckUpdate(&theEvent);
@@ -2378,6 +2737,9 @@
WindowPartCode _rv;
Point thePoint;
WindowPtr window;
+#ifndef MacFindWindow
+ PyMac_PRECHECK(MacFindWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePoint))
return NULL;
@@ -2393,6 +2755,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef FrontWindow
+ PyMac_PRECHECK(FrontWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = FrontWindow();
@@ -2405,6 +2770,9 @@
{
PyObject *_res = NULL;
WindowPtr _rv;
+#ifndef FrontNonFloatingWindow
+ PyMac_PRECHECK(FrontNonFloatingWindow);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = FrontNonFloatingWindow();
@@ -2421,6 +2789,9 @@
WindowPtr _rv;
WindowClass inWindowClass;
Boolean mustBeVisible;
+#ifndef GetFrontWindowOfClass
+ PyMac_PRECHECK(GetFrontWindowOfClass);
+#endif
if (!PyArg_ParseTuple(_args, "lb",
&inWindowClass,
&mustBeVisible))
@@ -2443,6 +2814,9 @@
WindowClass inWindowClass;
WindowPtr outWindow;
WindowPartCode outWindowPart;
+#ifndef FindWindowOfClass
+ PyMac_PRECHECK(FindWindowOfClass);
+#endif
if (!PyArg_ParseTuple(_args, "O&l",
PyMac_GetPoint, &where,
&inWindowClass))
@@ -2464,6 +2838,9 @@
static PyObject *Win_InitWindows(PyObject *_self, PyObject *_args)
{
PyObject *_res = NULL;
+#ifndef InitWindows
+ PyMac_PRECHECK(InitWindows);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
InitWindows();
@@ -2479,6 +2856,9 @@
{
PyObject *_res = NULL;
GrafPtr wPort;
+#ifndef GetWMgrPort
+ PyMac_PRECHECK(GetWMgrPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetWMgrPort(&wPort);
@@ -2494,6 +2874,9 @@
{
PyObject *_res = NULL;
CGrafPtr wMgrCPort;
+#ifndef GetCWMgrPort
+ PyMac_PRECHECK(GetCWMgrPort);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
GetCWMgrPort(&wMgrCPort);
@@ -2509,6 +2892,9 @@
{
PyObject *_res = NULL;
OSStatus _err;
+#ifndef InitFloatingWindows
+ PyMac_PRECHECK(InitFloatingWindows);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_err = InitFloatingWindows();
@@ -2525,6 +2911,9 @@
{
PyObject *_res = NULL;
Rect badRect;
+#ifndef InvalRect
+ PyMac_PRECHECK(InvalRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &badRect))
return NULL;
@@ -2541,6 +2930,9 @@
{
PyObject *_res = NULL;
RgnHandle badRgn;
+#ifndef InvalRgn
+ PyMac_PRECHECK(InvalRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &badRgn))
return NULL;
@@ -2557,6 +2949,9 @@
{
PyObject *_res = NULL;
Rect goodRect;
+#ifndef ValidRect
+ PyMac_PRECHECK(ValidRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetRect, &goodRect))
return NULL;
@@ -2573,6 +2968,9 @@
{
PyObject *_res = NULL;
RgnHandle goodRgn;
+#ifndef ValidRgn
+ PyMac_PRECHECK(ValidRgn);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
ResObj_Convert, &goodRgn))
return NULL;
@@ -2588,6 +2986,9 @@
PyObject *_res = NULL;
OSStatus _err;
Boolean collapse;
+#ifndef CollapseAllWindows
+ PyMac_PRECHECK(CollapseAllWindows);
+#endif
if (!PyArg_ParseTuple(_args, "b",
&collapse))
return NULL;
@@ -2604,6 +3005,9 @@
long _rv;
Rect theRect;
Point thePt;
+#ifndef PinRect
+ PyMac_PRECHECK(PinRect);
+#endif
if (!PyArg_ParseTuple(_args, "O&O&",
PyMac_GetRect, &theRect,
PyMac_GetPoint, &thePt))
@@ -2619,6 +3023,9 @@
{
PyObject *_res = NULL;
RgnHandle _rv;
+#ifndef GetGrayRgn
+ PyMac_PRECHECK(GetGrayRgn);
+#endif
if (!PyArg_ParseTuple(_args, ""))
return NULL;
_rv = GetGrayRgn();
@@ -2632,6 +3039,9 @@
PyObject *_res = NULL;
WindowPtr _rv;
CGrafPtr port;
+#ifndef GetWindowFromPort
+ PyMac_PRECHECK(GetWindowFromPort);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
GrafObj_Convert, &port))
return NULL;
@@ -2660,6 +3070,9 @@
short _rv;
Point thePoint;
WindowPtr theWindow;
+#ifndef FindWindow
+ PyMac_PRECHECK(FindWindow);
+#endif
if (!PyArg_ParseTuple(_args, "O&",
PyMac_GetPoint, &thePoint))
return NULL;
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index 29afcc6..81e6b53 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -195,8 +195,8 @@
module.addobject(object)
# Create the generator classes used to populate the lists
-Function = OSErrFunctionGenerator
-Method = OSErrMethodGenerator
+Function = OSErrWeakLinkFunctionGenerator
+Method = OSErrWeakLinkMethodGenerator
# Create and populate the lists
functions = []
diff --git a/Mac/Python/macglue.c b/Mac/Python/macglue.c
index 2789fef..f9c9aff 100644
--- a/Mac/Python/macglue.c
+++ b/Mac/Python/macglue.c
@@ -505,8 +505,7 @@
if (q->evtQWhat == keyDown &&
(char)q->evtQMessage == '.' &&
(q->evtQModifiers & cmdKey) != 0) {
- if ( flush )
- FlushEvents(keyDownMask, 0);
+ FlushEvents(keyDownMask, 0);
interrupted = 1;
break;
}
@@ -517,8 +516,6 @@
int
PyErr_CheckSignals()
{
- int xxx, xxx_old;
-
if (schedparams.enabled) {
if ( interrupted || (unsigned long)LMGetTicks() > schedparams.next_check ) {
scan_event_queue(0);
@@ -529,8 +526,6 @@
}
if ( PyMac_Yield() < 0)
return -1;
- xxx = LMGetTicks();
- xxx_old = schedparams.next_check;
schedparams.next_check = (unsigned long)LMGetTicks()
+ schedparams.check_interval;
}
@@ -734,7 +729,7 @@
*/
if ( (sioux_mbar=GetMenuBar()) == NULL ) {
#else
- {
+ if ( (sioux_mbar=GetMenuBar()) == NULL || GetMenuHandle(SIOUX_APPLEID) == NULL) {
#endif
/* Sioux menu not installed yet. Do so */
SIOUXSetupMenus();
diff --git a/Mac/ReadMe b/Mac/ReadMe
index 29a3fe8..6f3b73a 100644
--- a/Mac/ReadMe
+++ b/Mac/ReadMe
@@ -1,4 +1,4 @@
-How to install Python 2.2b1 on your Macintosh
+How to install Python 2.2b2 on your Macintosh
---------------------------------------------
This is a MacPython that can run on classic MacOS (from 8.1
@@ -128,11 +128,12 @@
It is probably a good idea to run the automatic tests. Start
Python and "import test.regrtest ; test.regrtest.main()".
+test_frozen will fail in MacPython because of different handling on
+frozen modules. This should not be a problem in normal use.
+
test_time will fail because MacPython accepts bogus values for
mktime(), this will be fixed later (it is not a very serious problem).
-test_descrtut will fail because of a problem with the test itself.
-
Three tests will fail on MacOS9 with MemoryErrors:
test_longexp, test_sha and test_zlib (on MacOSX these should pass).
@@ -160,7 +161,7 @@
Two items are installed in the system folder: the interpreter shared
libraries PythonCore and PythonCoreCarbon lives in the Extensions
-folder and the "Python 2.2b1 Preferences" file in the Python subfolder
+folder and the "Python 2.2b2 Preferences" file in the Python subfolder
in the Preferences folder. All the rest of Python lives in the folder
you installed in.
@@ -210,9 +211,9 @@
whether to upgrade. The bad news is that your old preference settings
are lost and you have to set them again.
-After you are satisfied that 2.2b1 works as expected you can trash
+After you are satisfied that 2.2b2 works as expected you can trash
anything in the system folder that has "python" in the name and not
-"2.2b1".
+"2.2b2".
The ConfigurePython... applets will try to detect incompatible
preferences files and offer to remove them. This means that re-running
diff --git a/Mac/Relnotes b/Mac/Relnotes
index 8614c4b..2bfe003 100644
--- a/Mac/Relnotes
+++ b/Mac/Relnotes
@@ -1,8 +1,8 @@
-Changes in 2.2b1 since 2.1.1
+Changes in 2.2b2 since 2.1.1
----------------------------
These release notes refer to Mac-specific changes only. See NEWS (in the Misc folder)
-for machine-independent changes. Changes that were already in 2.2a3 are flagged as such.
+for machine-independent changes. Changes that are new in 2.2b2 are flagged as such.
- The main change is that all toolbox modules have moved to a package called Carbon.
@@ -10,23 +10,33 @@
"from Res import *" to "from Carbon.Res import *". Please see the readme file for
some open questions and join the discussions on pythonmac-sig if you have anything
to contribute. Aside from reducing clutter this change will also benefit the
- port to Mach-O/OSX Python later. [2.2a3]
+ port to Mach-O/OSX Python later.
- On input MacPython now accepts either \n (unix style) or \r (mac style) newlines
for text files. This behaviour can be turned off with a preference.
- This is an experimental feature; again: feedback is requested. [2.2a3]
+ This is an experimental feature; again: feedback is requested.
+- Command-dot handling has been improved a lot: scripts are now much easier to interrupt,
+ and they only scan for cmd-. while in the foreground. [2.2b2]
+- "Copy" from the MacPython console window was always disabled. Fixed. [2.2b2]
+- This release should run on MacOS 8.1 again. [2.2b2 build 116]
+- A new, rather different GUSI I/O library is used. Please report any strange behaviour
+ with I/O to the pythonmac-sig mailing list! [2.2b2]
- There is a new module macresource which makes it easier to open a resource file
accompanying your script when the script is not (yet) converted to an applet.
- This module will later also do the right thing in Mach-O/OSX Python. [2.2a3]
+ This module will later also do the right thing in Mach-O/OSX Python.
+- A new, experimental module hfsplus is included, which gives access to some of the
+ functionality of the HFS+ API. [2.2b2]
- Threads had a stack that was too small for many serious Python applications (20K).
- They now get 64K. There is still no overflow check, though. [2.2a3]
-- Garbage collection and the gc module have (finally) been enabled. [2.2a3]
+ They now get 64K. There is still no overflow check, though.
+- Garbage collection and the gc module have (finally) been enabled.
- EasyDialogs.ProgressBar now has indeterminate progressbars if you specify maxval=0.
- This is also the new default. Patch supplied by Dean Draayer. [2.2a3]
+ This is also the new default. Patch supplied by Dean Draayer.
- There are new preferences for enabling old-style division warnings and for
accepting unix-style newlines in text input files. These can also be set during
- startup, and in addition you can select very verbose import tracing. [2.2a3]
-- Various outdated scripts have been moved to :Mac:Unsupported. [2.2a3]
-- Various outdated items from :Mac:Lib:test have been removed. [2.2a3]
+ startup, and in addition you can select very verbose import tracing.
+- The NavServices override for StandardFile has moved from early startup to the
+ time you import macfs. This speeds up MacPython startup.
+- Various outdated scripts have been moved to :Mac:Unsupported.
+- Various outdated items from :Mac:Lib:test have been removed.
- C Developers: you know have control over the Python console if you are embedding
MacPython in another application, thanks to Alexandre Parenteau. :Mac:Demo:embed.html
has very minimal documentation.
@@ -48,7 +58,7 @@
This list is probably incomplete, more problems may be listed on the MacPython homepage,
http://www.cwi.nl/~jack/macpython.html.
-- MacPython 2.2a3 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
+- MacPython 2.2b2 (and MacPython 2.1) will not run correctly on a multiprocessor MacOS X
machine, it will quickly deadlock during I/O operations. The GUSI I/O library is suspected,
hints/clues/workarounds are solicited.
- Tkinter does not work under Carbon.
@@ -56,8 +66,6 @@
- Tkinter file events do not work, unless you have opened the file through Tcl (but then
you cannot access it from Python).
- Aliases may not work in sys.path entries.
-- Under Carbon on OS9 only you may occasionally see a spurious KeyboardInterrupt. I have absolutely
- no clue as to what is causing this.
- PythonInterpreter used interactively will eat a lot of processor cycles. You should use
PythonIDE for interactive work and PythonInterpreter for scripts only. This is especially
true under OSX.
diff --git a/Mac/Tools/IDE/Widgets.rsrc b/Mac/Tools/IDE/Widgets.rsrc
index ddeab7c..2100f34 100644
--- a/Mac/Tools/IDE/Widgets.rsrc
+++ b/Mac/Tools/IDE/Widgets.rsrc
Binary files differ
diff --git a/Mac/mwerks/mwerks_carbon_config.h b/Mac/mwerks/mwerks_carbon_config.h
index 8f22320..491cf63 100644
--- a/Mac/mwerks/mwerks_carbon_config.h
+++ b/Mac/mwerks/mwerks_carbon_config.h
@@ -29,6 +29,7 @@
/* #define USE_GDBM /* Include the gdbm module */
/* #define USE_ZLIB /* Include the zlib module */
#define USE_APPEARANCE /* Enable Appearance support */
+#define WITH_HOTSHOT /* Enable hotshot profiler */
#define USE_MSL_MALLOC /* Disable private malloc. Also disables next two defines */
#ifndef USE_MSL_MALLOC
diff --git a/Mac/mwerks/mwerks_small_config.h b/Mac/mwerks/mwerks_small_config.h
index cdd8d86..d3087f7 100644
--- a/Mac/mwerks/mwerks_small_config.h
+++ b/Mac/mwerks/mwerks_small_config.h
@@ -25,6 +25,7 @@
/* #define USE_ZLIB /* Include the zlib module */
#define USE_APPEARANCE /* Enable Appearance support */
#define WITHOUT_FRAMEWORKS /* Use old-style Universal Header includes, not Carbon/Carbon.h */
+#define WITH_HOTSHOT /* Enable hotshot profiler */
#define USE_MSL_MALLOC /* Disable private malloc. Also disables next two defines */
#ifndef USE_MSL_MALLOC
diff --git a/Mac/scripts/fullbuild.py b/Mac/scripts/fullbuild.py
index c7ff3db..4ae94f0 100644
--- a/Mac/scripts/fullbuild.py
+++ b/Mac/scripts/fullbuild.py
@@ -292,7 +292,7 @@
(":Mac:Build:waste.carbon.mcp", "waste.carbon"),
(":Mac:Build:zlib.carbon.mcp", "zlib.carbon"),
(":Mac:Build:_dummy_tkinter.mcp", "_tkinter.carbon"),
- (":Mac:Build:hfsplus.mcp", "hfsplus.carbon"),
+ (":Mac:Build:hfsplus.carbon.mcp", "hfsplus.carbon"),
## (":Extensions:Imaging:_tkinter.carbon.mcp", "_tkinter.carbon"),
(":Mac:Build:ColorPicker.carbon.mcp", "ColorPicker.carbon"),
(":Mac:Build:_AE.carbon.mcp", "_AE.carbon"),
diff --git a/Mac/scripts/genpluginprojects.py b/Mac/scripts/genpluginprojects.py
index bbd8f04..a1e7e57 100644
--- a/Mac/scripts/genpluginprojects.py
+++ b/Mac/scripts/genpluginprojects.py
@@ -35,7 +35,8 @@
project=None, projectdir=None,
sources=[], sourcedirs=[],
libraries=[], extradirs=[],
- extraexportsymbols=[], outputdir=":::Lib:lib-dynload"):
+ extraexportsymbols=[], outputdir=":::Lib:lib-dynload",
+ libraryflags=None, stdlibraryflags=None):
if architecture == "all":
# For the time being we generate two project files. Not as nice as
# a single multitarget project, but easier to implement for now.
@@ -90,6 +91,10 @@
"mac_dllname" : dllname,
"prefixname" : prefixname,
}
+ if libraryflags:
+ dict['libraryflags'] = libraryflags
+ if stdlibraryflags:
+ dict['stdlibraryflags'] = stdlibraryflags
mkcwproject.mkproject(os.path.join(projectdir, project), module, dict,
force=FORCEREBUILD, templatename=templatename)
@@ -124,10 +129,10 @@
genpluginproject("carbon", "_Cm", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Ctl", outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Ctl", libraries=["ControlsLib", "AppearanceLib"],
- outputdir="::Lib:Carbon")
+ libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Dlg", outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Dlg", libraries=["DialogsLib", "AppearanceLib"],
- outputdir="::Lib:Carbon")
+ libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Drag", outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Drag", libraries=["DragLib"], outputdir="::Lib:Carbon")
genpluginproject("all", "_Evt", outputdir="::Lib:Carbon")
@@ -138,7 +143,7 @@
genpluginproject("all", "_List", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Menu", outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Menu", libraries=["MenusLib", "ContextualMenu", "AppearanceLib"],
- outputdir="::Lib:Carbon")
+ libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
genpluginproject("all", "_Qd", outputdir="::Lib:Carbon")
genpluginproject("ppc", "_Qt", libraries=["QuickTimeLib"], outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Qt", outputdir="::Lib:Carbon")
@@ -153,8 +158,8 @@
genpluginproject("ppc", "_Mlte", libraries=["Textension"], outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Mlte", outputdir="::Lib:Carbon")
genpluginproject("carbon", "_Win", outputdir="::Lib:Carbon")
- genpluginproject("ppc", "_Win", libraries=["WindowsLib", "AppearanceLib"],
- outputdir="::Lib:Carbon")
+ genpluginproject("ppc", "_Win", libraries=["CarbonAccessors.o", "WindowsLib", "AppearanceLib"],
+ libraryflags="Debug, WeakImport", outputdir="::Lib:Carbon")
# Carbon Only?
genpluginproject("carbon", "_CF", outputdir="::Lib:Carbon")
genpluginproject("carbon", "hfsplus")
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index a60d3ef..27612f4 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -121,9 +121,14 @@
}
if (f->f_fp == NULL) {
#ifdef NO_FOPEN_ERRNO
- /* Metroworks only, not testable, so unchanged */
+ /* Metroworks only, wich does not always sets errno */
if (errno == 0) {
- PyErr_SetString(PyExc_IOError, "Cannot open file");
+ PyObject *v;
+ v = Py_BuildValue("(is)", 0, "Cannot open file");
+ if (v != NULL) {
+ PyErr_SetObject(PyExc_IOError, v);
+ Py_DECREF(v);
+ }
return NULL;
}
#endif
diff --git a/Tools/bgen/bgen/macsupport.py b/Tools/bgen/bgen/macsupport.py
index d8677b0..8301864 100644
--- a/Tools/bgen/bgen/macsupport.py
+++ b/Tools/bgen/bgen/macsupport.py
@@ -157,7 +157,9 @@
"Mix-in to test the function actually exists (!= NULL) before calling"
def precheck(self):
+ Output('#ifndef %s', self.name)
Output('PyMac_PRECHECK(%s);', self.name)
+ Output('#endif')
class WeakLinkFunctionGenerator(WeakLinkMixIn, FunctionGenerator): pass
class WeakLinkMethodGenerator(WeakLinkMixIn, MethodGenerator): pass