Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 6b6e61d

Browse files
committed
(finally) unified the interpreter and the applet as Just suggested ages ago. The
resulting program is called PythonInterpreter.
1 parent 66b989c commit 6b6e61d

2 files changed

Lines changed: 12 additions & 39 deletions

File tree

Mac/Python/macapplet.c

Lines changed: 0 additions & 36 deletions
This file was deleted.

Mac/Python/macapplication.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,15 +22,24 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
2222
2323
******************************************************************/
2424

25-
/* Macintosh Applet Python main program */
25+
/* Macintosh Python main program for both applets and interpreter */
2626

27-
#ifdef SYMANTEC__CFM68K__
27+
#include <Resources.h>
28+
29+
#ifdef __CFM68K__
2830
#pragma lib_export on
2931
#endif
3032

33+
extern void PyMac_InitApplet();
3134
extern void PyMac_InitApplication();
3235

3336
void
3437
main() {
35-
PyMac_InitApplication();
38+
Handle mainpyc;
39+
40+
mainpyc = Get1NamedResource('PYC ', "\p__main__");
41+
if (mainpyc != NULL)
42+
PyMac_InitApplet();
43+
else
44+
PyMac_InitApplication();
3645
}

0 commit comments

Comments
 (0)