summaryrefslogtreecommitdiffstats
path: root/Mac
diff options
context:
space:
mode:
authorJack Jansen <jack.jansen@cwi.nl>1995-02-13 11:36:25 (GMT)
committerJack Jansen <jack.jansen@cwi.nl>1995-02-13 11:36:25 (GMT)
commit0f6ca80e7111a378d990c86d239423a5383d7178 (patch)
tree5fb1398ace5e2ed2f0026f4fc2130369fecd62d7 /Mac
parentf950f8d414ccf95531b2610119311ba0de70b736 (diff)
downloadcpython-0f6ca80e7111a378d990c86d239423a5383d7178.zip
cpython-0f6ca80e7111a378d990c86d239423a5383d7178.tar.gz
cpython-0f6ca80e7111a378d990c86d239423a5383d7178.tar.bz2
Use PyMac_GetPythonDir() to obtain python homedir
fileargument moved here from macmain.c
Diffstat (limited to 'Mac')
-rw-r--r--Mac/Modules/config.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/Mac/Modules/config.c b/Mac/Modules/config.c
index 098ff4f..5dab182 100644
--- a/Mac/Modules/config.c
+++ b/Mac/Modules/config.c
@@ -31,6 +31,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#ifdef macintosh
/* The Macintosh main program is in macmain.c */
#define NO_MAIN
+char *fileargument; /* So main() can tell us the program name */
#endif
#include <stdio.h>
@@ -41,6 +42,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "osdefs.h"
#include "intrcheck.h"
+char *PyMac_GetPythonDir();
#ifndef NO_MAIN
@@ -154,15 +156,12 @@ getpythonpath()
** - Chdir to where the source file (if any) lives
*/
static char *pythonpath;
- extern char *fileargument;
- char curwd[256];
+ char *curwd;
char *p, *endp;
int newlen;
if ( pythonpath ) return pythonpath;
- if (getwd(curwd) < 0 ) {
- return PYTHONPATH;
- }
+ curwd = PyMac_GetPythonDir();
p = PYTHONPATH;
endp = p;
pythonpath = malloc(2);