summaryrefslogtreecommitdiffstats
path: root/Mac/Modules/qd/_Qdmodule.c
diff options
context:
space:
mode:
authorRonald Oussoren <ronaldoussoren@mac.com>2008-06-05 12:58:24 (GMT)
committerRonald Oussoren <ronaldoussoren@mac.com>2008-06-05 12:58:24 (GMT)
commit5640ce2f1edc0148ee14fd3daeb7ac700700bb71 (patch)
tree9bc8b41710d3a86ccbb579a0209928d787386b69 /Mac/Modules/qd/_Qdmodule.c
parent80af6da7489c3b28e0a46c73849da34273972e3b (diff)
downloadcpython-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/qd/_Qdmodule.c')
-rw-r--r--Mac/Modules/qd/_Qdmodule.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/Mac/Modules/qd/_Qdmodule.c b/Mac/Modules/qd/_Qdmodule.c
index f0ff9ad..f2202e01 100644
--- a/Mac/Modules/qd/_Qdmodule.c
+++ b/Mac/Modules/qd/_Qdmodule.c
@@ -4,6 +4,7 @@
#include "Python.h"
+#ifndef __LP64__
#include "pymactoolbox.h"
@@ -6544,8 +6545,10 @@ static PyObject *Qd_RawBitMap(PyObject *_self, PyObject *_args)
return _res;
}
+#endif /* __LP64__ */
static PyMethodDef Qd_methods[] = {
+#ifndef __LP64__
{"GetPort", (PyCFunction)Qd_GetPort, 1,
PyDoc_STR("() -> (GrafPtr port)")},
{"GrafDevice", (PyCFunction)Qd_GrafDevice, 1,
@@ -7080,10 +7083,12 @@ static PyMethodDef Qd_methods[] = {
PyDoc_STR("Take (string, int, Rect) argument and create BitMap")},
{"RawBitMap", (PyCFunction)Qd_RawBitMap, 1,
PyDoc_STR("Take string BitMap and turn into BitMap object")},
+#endif /* __LP64__ */
{NULL, NULL, 0}
};
+#ifndef __LP64__
/* Like BMObj_New, but the original bitmap data structure is copied (and
** released when the object is released)
@@ -7101,11 +7106,13 @@ PyObject *BMObj_NewCopied(BitMapPtr itself)
return (PyObject *)it;
}
+#endif /* __LP64__ */
void init_Qd(void)
{
PyObject *m;
+#ifndef __LP64__
PyObject *d;
@@ -7117,8 +7124,10 @@ void init_Qd(void)
PyMac_INIT_TOOLBOX_OBJECT_NEW(RGBColorPtr, QdRGB_New);
PyMac_INIT_TOOLBOX_OBJECT_CONVERT(RGBColor, QdRGB_Convert);
+#endif /* __LP64__ */
m = Py_InitModule("_Qd", Qd_methods);
+#ifndef __LP64__
d = PyModule_GetDict(m);
Qd_Error = PyMac_GetOSErrException();
if (Qd_Error == NULL ||
@@ -7138,6 +7147,7 @@ void init_Qd(void)
/* Backward-compatible name */
Py_INCREF(&BitMap_Type);
PyModule_AddObject(m, "BitMapType", (PyObject *)&BitMap_Type);
+#endif /* __LP64__ */
}
/* ========================= End module _Qd ========================= */