[PyObjC-svn] r2219 - in trunk/pyobjc/pyobjc-core: . Modules/objc
[email protected] Thu, 14 May 2009 04:05:46 -0500
| Newsgroups | gmane.comp.python.pyobjc.cvs |
|---|---|
| Message-ID | <[email protected]> |
Author: ronaldoussoren
Date: Thu May 14 04:05:45 2009
New Revision: 2219
Log:
* small changes to make it possible to build using
the python.org python distribution (finally...)
* varlist.m: patch to get rid of a compile-time warning
with Python 2.6.
There are some other (harmless) warnings at the moment,
I'm planning to fix them later on using the same
kind of patch. In an ideal world we should be able
to compile using -Werror.
Modified:
trunk/pyobjc/pyobjc-core/Modules/objc/bundle-variables.m
trunk/pyobjc/pyobjc-core/Modules/objc/varlist.m
trunk/pyobjc/pyobjc-core/setup.py
Modified: trunk/pyobjc/pyobjc-core/Modules/objc/bundle-variables.m
==============================================================================
--- trunk/pyobjc/pyobjc-core/Modules/objc/bundle-variables.m (original)
+++ trunk/pyobjc/pyobjc-core/Modules/objc/bundle-variables.m Thu May 14 04:05:45 2009
@@ -220,10 +220,14 @@
PyObjC_HANDLER
PyObjCErr_FromObjC(localException);
- NS_VALUERETURN(NULL, PyObject*);
+ cfBundle = NULL;
PyObjC_ENDHANDLER
+ if (cfBundle == NULL && PyErr_Occurred()) {
+ return NULL;
+ }
+
if (cfBundle == NULL) {
PyErr_Format(PyObjCExc_Error,
"Cannot convert NSBundle to CFBundle");
Modified: trunk/pyobjc/pyobjc-core/Modules/objc/varlist.m
==============================================================================
--- trunk/pyobjc/pyobjc-core/Modules/objc/varlist.m (original)
+++ trunk/pyobjc/pyobjc-core/Modules/objc/varlist.m Thu May 14 04:05:45 2009
@@ -243,6 +243,10 @@
0, /* tp_subclasses */
0, /* tp_weaklist */
0 /* tp_del */
+#if PY_VERSION_HEX >= 0x02060000
+ , 0 /* tp_version_tag */
+#endif
+
};
PyObject*
Modified: trunk/pyobjc/pyobjc-core/setup.py
==============================================================================
--- trunk/pyobjc/pyobjc-core/setup.py (original)
+++ trunk/pyobjc/pyobjc-core/setup.py Thu May 14 04:05:45 2009
@@ -150,6 +150,11 @@
if not os.path.exists('/usr/include/objc/runtime.h'):
CFLAGS.append('-DNO_OBJC2_RUNTIME')
+else:
+ # Force compilation with the local SDK, compilation of PyObC will result in
+ # a binary that runs on other releases of the OS without using a particular SDK.
+ CFLAGS.extend(['-isysroot', '/'])
+
OBJC_LDFLAGS = frameworks('CoreFoundation', 'Foundation', 'Carbon')
------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image
processing features enabled. http://p.sf.net/sfu/kodak-com