diff options
author | Ronald Oussoren <ronaldoussoren@mac.com> | 2008-06-05 12:58:24 (GMT) |
---|---|---|
committer | Ronald Oussoren <ronaldoussoren@mac.com> | 2008-06-05 12:58:24 (GMT) |
commit | 5640ce2f1edc0148ee14fd3daeb7ac700700bb71 (patch) | |
tree | 9bc8b41710d3a86ccbb579a0209928d787386b69 /Mac/Modules/win/_Winmodule.c | |
parent | 80af6da7489c3b28e0a46c73849da34273972e3b (diff) | |
download | cpython-5640ce2f1edc0148ee14fd3daeb7ac700700bb71.zip cpython-5640ce2f1edc0148ee14fd3daeb7ac700700bb71.tar.gz cpython-5640ce2f1edc0148ee14fd3daeb7ac700700bb71.tar.bz2 |
MacOS X: Enable 4-way universal builds
This patch adds a new configure argument on OSX:
--with-universal-archs=[32-bit|64-bit|all]
When used with the --enable-universalsdk option this controls which
CPU architectures are includes in the framework. The default is 32-bit,
meaning i386 and ppc. The most useful alternative is 'all', which includes
all 4 CPU architectures supported by MacOS X (i386, ppc, x86_64 and ppc64).
This includes limited support for the Carbon bindings in 64-bit mode as well,
limited because (a) I haven't done extensive testing and (b) a large portion
of the Carbon API's aren't available in 64-bit mode anyway.
I've also duplicated a feature of Apple's build of python: setting the
environment variable 'ARCHFLAGS' controls the '-arch' flags used for building
extensions using distutils.
Diffstat (limited to 'Mac/Modules/win/_Winmodule.c')
-rw-r--r-- | Mac/Modules/win/_Winmodule.c | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/Mac/Modules/win/_Winmodule.c b/Mac/Modules/win/_Winmodule.c index 21682b6..1562a38 100644 --- a/Mac/Modules/win/_Winmodule.c +++ b/Mac/Modules/win/_Winmodule.c @@ -3,7 +3,7 @@ #include "Python.h" - +#ifndef __LP64__ #include "pymactoolbox.h" @@ -3147,8 +3147,10 @@ static PyObject *Win_FindWindow(PyObject *_self, PyObject *_args) WinObj_WhichWindow, theWindow); return _res; } +#endif /* __LP64__ */ static PyMethodDef Win_methods[] = { +#ifndef __LP64__ {"GetNewCWindow", (PyCFunction)Win_GetNewCWindow, 1, PyDoc_STR("(short windowID, WindowPtr behind) -> (WindowPtr _rv)")}, {"NewWindow", (PyCFunction)Win_NewWindow, 1, @@ -3200,10 +3202,12 @@ static PyMethodDef Win_methods[] = { {"FindWindow", (PyCFunction)Win_FindWindow, 1, PyDoc_STR("(Point thePoint) -> (short _rv, WindowPtr theWindow)")}, {NULL, NULL, 0} +#endif /* __LP64__ */ }; +#ifndef __LP64__ /* Return the object corresponding to the window, or NULL */ PyObject * @@ -3226,20 +3230,22 @@ WinObj_WhichWindow(WindowPtr w) return it; } +#endif /* __LP64__ */ void init_Win(void) { PyObject *m; +#ifndef __LP64__ PyObject *d; + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New); + PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow); + PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert); - - PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_New); - PyMac_INIT_TOOLBOX_OBJECT_NEW(WindowPtr, WinObj_WhichWindow); - PyMac_INIT_TOOLBOX_OBJECT_CONVERT(WindowPtr, WinObj_Convert); - +#endif /* __LP64__ */ m = Py_InitModule("_Win", Win_methods); +#ifndef __LP64__ d = PyModule_GetDict(m); Win_Error = PyMac_GetOSErrException(); if (Win_Error == NULL || @@ -3252,6 +3258,7 @@ void init_Win(void) /* Backward-compatible name */ Py_INCREF(&Window_Type); PyModule_AddObject(m, "WindowType", (PyObject *)&Window_Type); +#endif /* __LP64__ */ } /* ======================== End module _Win ========================= */ |