summaryrefslogtreecommitdiffstats
path: root/Mac/Python/macmain.c
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1996-08-02 15:16:16 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1996-08-02 15:16:16 (GMT)
commit1d2f863e51236174a16d3afbb6e5744ddd01f961 (patch)
tree0987af50ff8ae4ff0d10e135276012af89a8e1b8 /Mac/Python/macmain.c
parentd84e7aaf007cb3d878d73d0fb84b3e7d98a8caf0 (diff)
downloadcpython-1d2f863e51236174a16d3afbb6e5744ddd01f961.zip
cpython-1d2f863e51236174a16d3afbb6e5744ddd01f961.tar.gz
cpython-1d2f863e51236174a16d3afbb6e5744ddd01f961.tar.bz2
Guido's 1.4b2 fixes: Py_GetProgramName, Py_GetPrefix and Py_GetExecPrefix.
Diffstat (limited to 'Mac/Python/macmain.c')
-rw-r--r--Mac/Python/macmain.c26
1 files changed, 20 insertions, 6 deletions
diff --git a/Mac/Python/macmain.c b/Mac/Python/macmain.c
index 0057309..5e78cdd 100644
--- a/Mac/Python/macmain.c
+++ b/Mac/Python/macmain.c
@@ -58,10 +58,10 @@ extern char *Py_GetVersion Py_PROTO((void));
extern char *Py_GetCopyright Py_PROTO((void));
-/* For getprogramname(); set by main() */
+/* For Py_GetProgramName(); set by main() */
static char *argv0;
-/* For getargcargv(); set by main() */
+/* For Py_GetArgcArgv(); set by main() */
static char **orig_argv;
static int orig_argc;
@@ -316,9 +316,9 @@ Py_Main(argc, argv)
PyMac_InteractiveOptions(&inspect, &Py_VerboseFlag, &Py_SuppressPrintingFlag,
&unbuffered, &Py_DebugFlag, &keep_normal, &keep_error, &argc, &argv);
- orig_argc = argc; /* For getargcargv() */
+ orig_argc = argc; /* For Py_GetArgcArgv() */
orig_argv = argv;
- argv0 = argv[0]; /* For getprogramname() */
+ argv0 = argv[0]; /* For Py_GetProgramName() */
if (unbuffered) {
#ifndef MPW
@@ -403,7 +403,7 @@ PyMac_Exit(status)
/* Return the program name -- some code out there needs this. */
char *
-getprogramname()
+Py_GetProgramName()
{
return argv0;
}
@@ -413,10 +413,24 @@ getprogramname()
This is rare, but it is needed by the secureware extension. */
void
-getargcargv(argc,argv)
+Py_GetArgcArgv(argc,argv)
int *argc;
char ***argv;
{
*argc = orig_argc;
*argv = orig_argv;
}
+
+/* More cruft that shouldn't really be here, used in sysmodule.c */
+
+char *
+Py_GetPrefix()
+{
+ return "";
+}
+
+char *
+Py_GetExecPrefix()
+{
+ return "";
+}