diff options
author | Jay Freeman <saurik@saurik.com> | 2008-04-10 07:41:09 +0000 |
---|---|---|
committer | Jay Freeman <saurik@saurik.com> | 2008-04-10 07:41:09 +0000 |
commit | 0ac911e83177afaa52ec6d422c0b13dc8655817e (patch) | |
tree | c88b93ab525fd32468a9a1f5b40e7e8add9e37fe /data/uicaboodle.py/uicaboodle.m | |
parent | a0063d08dcc6dad1a884480bb952531460a1019e (diff) |
Ported UICaboodle.py to iPhoneOS 2.0.
git-svn-id: http://svn.telesphoreo.org/trunk@209 514c082c-b64e-11dc-b46d-3d985efe055d
Diffstat (limited to 'data/uicaboodle.py/uicaboodle.m')
-rw-r--r-- | data/uicaboodle.py/uicaboodle.m | 11 |
1 files changed, 10 insertions, 1 deletions
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 }}; |