From: Jack Jansen Date: Wed, 15 Jan 1997 15:49:08 +0000 (+0000) Subject: Added PyMac_Initialize() routine, to be used by embedding programs (in X-Git-Tag: v1.5a1~514 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=52ac0372492200e326677c95ffc2fe35358c0dd2;p=python Added PyMac_Initialize() routine, to be used by embedding programs (in stead of standard Py_Initialize(), which it calls). --- diff --git a/Mac/Include/macglue.h b/Mac/Include/macglue.h index 907beb154c..49575a705f 100644 --- a/Mac/Include/macglue.h +++ b/Mac/Include/macglue.h @@ -102,3 +102,4 @@ PyObject *PyMac_BuildEventRecord(EventRecord *); /* Convert EventRecord to PyObj int PyMac_GetFixed(PyObject *, Fixed *); /* argument parser for Fixed */ PyObject *PyMac_BuildFixed(Fixed); /* Convert Fixed to PyObject */ void PyMac_InitApplet(void); /* Initialize and run an Applet */ +void PyMac_Initialize(void); /* Initialize function for embedding Python */ diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c index 583ed1ae4b..b60985d5d2 100644 --- a/Mac/Python/macmain.c +++ b/Mac/Python/macmain.c @@ -192,7 +192,7 @@ PyMac_InteractiveOptions(PyMac_PrefRecord *p, int *argcp, char ***argvp) ** Initialization code, shared by interpreter and applets */ static void -init_common(int *argcp, char ***argvp) +init_common(int *argcp, char ***argvp, int embedded) { /* Remember resource fork refnum, for later */ PyMac_AppRefNum = CurResFile(); @@ -223,11 +223,18 @@ init_common(int *argcp, char ***argvp) options.keep_error = 1; /* default-default */ PyMac_PreferenceOptions(&options); - /* Create argc/argv. Do it before we go into the options event loop. */ - *argcp = PyMac_GetArgv(argvp, options.noargs); - - /* Do interactive option setting, if allowed and