summaryrefslogtreecommitdiffstats
path: root/Mac/Python/macapplication.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1999-02-15 21:33:34 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1999-02-15 21:33:34 (GMT)
commit6b6e61dd328c16d848be7e470677dee749085bfa (patch)
tree12b729fddfa170dc24cf43604af2ad572224ae66 /Mac/Python/macapplication.c
parent66b989c80594dba22bcb2e3a37aefca1c8824414 (diff)
downloadcpython-6b6e61dd328c16d848be7e470677dee749085bfa.zip
cpython-6b6e61dd328c16d848be7e470677dee749085bfa.tar.gz
cpython-6b6e61dd328c16d848be7e470677dee749085bfa.tar.bz2
(finally) unified the interpreter and the applet as Just suggested ages ago. The
resulting program is called PythonInterpreter.
Diffstat (limited to 'Mac/Python/macapplication.c')
-rw-r--r--Mac/Python/macapplication.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/Mac/Python/macapplication.c b/Mac/Python/macapplication.c
index fbe6415..a92eb3a 100644
--- a/Mac/Python/macapplication.c
+++ b/Mac/Python/macapplication.c
@@ -22,15 +22,24 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
******************************************************************/
-/* Macintosh Applet Python main program */
+/* Macintosh Python main program for both applets and interpreter */
-#ifdef SYMANTEC__CFM68K__
+#include <Resources.h>
+
+#ifdef __CFM68K__
#pragma lib_export on
#endif
+extern void PyMac_InitApplet();
extern void PyMac_InitApplication();
void
main() {
- PyMac_InitApplication();
+ Handle mainpyc;
+
+ mainpyc = Get1NamedResource('PYC ', "\p__main__");
+ if (mainpyc != NULL)
+ PyMac_InitApplet();
+ else
+ PyMac_InitApplication();
}