summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/win/winsupport.py
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:35:07 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>2000-06-02 21:35:07 (GMT)
commite79dc76f53dfa18fb08c35f71b049259642c0142 (patch)
tree2d9cc6228cc713336a01d9ff09571eacff3a2ba0 /Mac/Modules/win/winsupport.py
parent33d1ad28cba273b94c70ffc22deb6c53b0c1b068 (diff)
downloadcpython-e79dc76f53dfa18fb08c35f71b049259642c0142.zip
cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.gz
cpython-e79dc76f53dfa18fb08c35f71b049259642c0142.tar.bz2
Made the core toolbox modules carbon-compatible using the new greylist feature of bgen: non-carbon methods are still included in non-carbon MacPython. The issue of backward compatibility of Python code is still open.
Macmodule and macosmodule have also been carbonified. Some functionality is still missing there.
Diffstat (limited to 'Mac/Modules/win/winsupport.py')
-rw-r--r--Mac/Modules/win/winsupport.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Mac/Modules/win/winsupport.py b/Mac/Modules/win/winsupport.py
index a6104d8..cc1c750 100644
--- a/Mac/Modules/win/winsupport.py
+++ b/Mac/Modules/win/winsupport.py
@@ -87,10 +87,12 @@ class MyObjectDefinition(GlobalObjectDefinition):
GlobalObjectDefinition.outputInitStructMembers(self)
Output("SetWRefCon(itself, (long)it);")
def outputCheckConvertArg(self):
+ Output("#ifndef TARGET_API_MAC_CARBON")
OutLbrace("if (DlgObj_Check(v))")
Output("*p_itself = ((WindowObject *)v)->ob_itself;")
Output("return 1;")
OutRbrace()
+ Output("#endif")
Out("""
if (v == Py_None) { *p_itself = NULL; return 1; }
if (PyInt_Check(v)) { *p_itself = (WindowPtr)PyInt_AsLong(v); return 1; }