summaryrefslogtreecommitdiffstats
path: root/Mac/Python/macapplication.c
diff options
context:
space:
mode:
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();
}