|
| 1 | +/*********************************************************** |
| 2 | +Copyright 1991-1995 by Stichting Mathematisch Centrum, Amsterdam, |
| 3 | +The Netherlands. |
| 4 | +
|
| 5 | + All Rights Reserved |
| 6 | +
|
| 7 | +Permission to use, copy, modify, and distribute this software and its |
| 8 | +documentation for any purpose and without fee is hereby granted, |
| 9 | +provided that the above copyright notice appear in all copies and that |
| 10 | +both that copyright notice and this permission notice appear in |
| 11 | +supporting documentation, and that the names of Stichting Mathematisch |
| 12 | +Centrum or CWI not be used in advertising or publicity pertaining to |
| 13 | +distribution of the software without specific, written prior permission. |
| 14 | +
|
| 15 | +STICHTING MATHEMATISCH CENTRUM DISCLAIMS ALL WARRANTIES WITH REGARD TO |
| 16 | +THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND |
| 17 | +FITNESS, IN NO EVENT SHALL STICHTING MATHEMATISCH CENTRUM BE LIABLE |
| 18 | +FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES |
| 19 | +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN |
| 20 | +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT |
| 21 | +OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
| 22 | +
|
| 23 | +******************************************************************/ |
| 24 | + |
| 25 | +/* Return the initial module search path. */ |
| 26 | + |
1 | 27 | #include "Python.h" |
2 | 28 | #include "osdefs.h" |
3 | 29 |
|
4 | | -#ifdef HAVE_STDLIB_H |
5 | | -#include <stdlib.h> |
6 | | -#else |
7 | | -extern char *getenv Py_PROTO((const char *)); |
8 | | -#endif |
9 | | - |
10 | 30 |
|
11 | 31 | #ifndef PYTHONPATH |
12 | 32 | #define PYTHONPATH ".:/usr/local/lib/python" |
13 | 33 | #endif |
14 | 34 |
|
15 | 35 |
|
16 | | -/* Return the initial python search path. This is called once from |
17 | | - initsys() to initialize sys.path. The environment variable |
18 | | - PYTHONPATH is fetched and the default path appended. The default |
19 | | - path may be passed to the preprocessor; if not, a system-dependent |
20 | | - default is used. */ |
| 36 | +/* This is called once from pythonrun to initialize sys.path. The |
| 37 | + environment variable PYTHONPATH is fetched and the default path |
| 38 | + appended. The default path may be passed to the preprocessor; if |
| 39 | + not, a hardcoded default is used, which only makes (some) sense on |
| 40 | + Unix. */ |
21 | 41 |
|
22 | 42 | char * |
23 | | -getpythonpath() |
| 43 | +Py_GetPath() |
24 | 44 | { |
25 | 45 | char *path = getenv("PYTHONPATH"); |
26 | 46 | char *defpath = PYTHONPATH; |
|
0 commit comments