summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--data/uicaboodle.py/make.sh2
-rw-r--r--data/uicaboodle.py/uicaboodle.m11
2 files changed, 11 insertions, 2 deletions
diff --git a/data/uicaboodle.py/make.sh b/data/uicaboodle.py/make.sh
index 0717ab445..2a0f85dd1 100644
--- a/data/uicaboodle.py/make.sh
+++ b/data/uicaboodle.py/make.sh
@@ -1,3 +1,3 @@
-${PKG_TARG}-gcc -o _uicaboodle.dylib "${PKG_DATA}/uicaboodle.m" -I"${PKG_ROOT}"/usr/include/python2.5 -I "$(PKG_WORK_ pyobjc)"/*/pyobjc-core/Modules/objc -lpython2.5 -framework UIKit -dynamiclib -framework Foundation
+${PKG_TARG}-gcc -o _uicaboodle.dylib "${PKG_DATA}/uicaboodle.m" -I"$(PKG_DEST_ python)"/usr/include/python2.5 -I "$(PKG_WORK_ pyobjc)"/*/pyobjc-core/Modules/objc -lpython2.5 -framework UIKit -dynamiclib -framework Foundation -lobjc -framework CoreFoundation
pkg: mkdir -p /usr/lib/python2.5/lib-dynload
pkg: cp -a _uicaboodle.dylib /usr/lib/python2.5/lib-dynload
diff --git a/data/uicaboodle.py/uicaboodle.m b/data/uicaboodle.py/uicaboodle.m
index 6cd372868..aa219ec52 100644
--- a/data/uicaboodle.py/uicaboodle.m
+++ b/data/uicaboodle.py/uicaboodle.m
@@ -26,6 +26,7 @@ static PyObject* objc_UIApplicationMain(
_assert(PyObjC_API != NULL);
_assert(args != NULL);
+ /* XXX: correctly parse __OBJC2__ condition */
if (!PyArg_ParseTuple(args, "OO", &arga, &_class)) {
PyErr_SetString(PyExc_TypeError, "Invalid Arguments");
return NULL;
@@ -62,7 +63,11 @@ static PyObject* objc_UIApplicationMain(
}
PyObjC_DURING
+#ifdef __OBJC2__
+ res = UIApplicationMain(argc, argv, nil, [NSString stringWithUTF8String:class_getName(PyObjC_API->cls_get_class(_class))]);
+#else
res = UIApplicationMain(argc, argv, PyObjC_API->cls_get_class(_class));
+#endif
PyObjC_HANDLER
PyObjCErr_FromObjC(localException);
PyObjC_ENDHANDLER
@@ -81,7 +86,11 @@ static PyMethodDef mod_methods[] = {{
"UIApplicationMain",
/*(PyCFunction)*/ objc_UIApplicationMain,
METH_VARARGS|METH_KEYWORDS,
- "int UIApplicationMain(int argc, const char *argv[], Class _class);"
+#ifdef __OBJC2__
+ "int UIApplicationMain(int argc, char *argv[], NSString *principalClassName, NSString *delegateClassName);"
+#else
+ "int UIApplicationMain(int argc, char *argv[], Class _class);"
+#endif
}, {
NULL, NULL, 0, NULL
}};