File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -748,21 +748,10 @@ PyMac_BuildEventRecord(EventRecord *e)
748748}
749749
750750
751- /* What follows is used only by applets. */
752-
753- static void
754- init_mac_world ()
755- {
756- MaxApplZone ();
757- InitGraf (& qd .thePort );
758- InitFonts ();
759- InitWindows ();
760- TEInit ();
761- InitDialogs ((long )0 );
762- InitMenus ();
763- InitCursor ();
764- }
751+ /* ---------- */
752+ /* Applet support */
765753
754+ /* Run a compiled Python Python script from 'PYC ' resource __main__ */
766755static int
767756run_main_resource ()
768757{
@@ -795,14 +784,16 @@ run_main_resource()
795784 return 0 ;
796785}
797786
787+ /* Initialization sequence for applets */
798788void
799789PyMac_InitApplet ()
800790{
801- static char * argv [] = {"__main__" , NULL };
791+ int argc ;
792+ char * * argv ;
802793
803- init_mac_world ( );
794+ argc = PyMac_GetArgv ( & argv );
804795 Py_Initialize ();
805- PySys_SetArgv (( sizeof argv / sizeof argv [ 0 ]) - 1 , argv );
796+ PySys_SetArgv (argc , argv );
806797 run_main_resource ();
807798 fflush (stderr );
808799 fflush (stdout );
You can’t perform that action at this time.
0 commit comments