Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d8bac6d

Browse files
committed
Move SEP to osdefs.h. Use MAXPATHLEN from osdefs.h.
1 parent 7169dbb commit d8bac6d

1 file changed

Lines changed: 2 additions & 15 deletions

File tree

Python/import.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3636
#include "marshal.h"
3737
#include "compile.h"
3838
#include "ceval.h"
39+
#include "osdefs.h"
3940

4041
#ifdef DEBUG
4142
#define D(x) x
@@ -53,20 +54,6 @@ extern char *argv0;
5354

5455
#define MAGIC 0x949494L
5556

56-
/* Define pathname separator used in file names */
57-
58-
#ifdef macintosh
59-
#define SEP ':'
60-
#endif
61-
62-
#ifdef MSDOS
63-
#define SEP '\\'
64-
#endif
65-
66-
#ifndef SEP
67-
#define SEP '/'
68-
#endif
69-
7057
static object *modules;
7158

7259
/* Forward */
@@ -181,7 +168,7 @@ get_module(m, name, m_ret)
181168
FILE *fp, *fpc;
182169
node *n;
183170
int err;
184-
char namebuf[258];
171+
char namebuf[MAXPATHLEN+1];
185172
int namelen;
186173
long mtime;
187174
extern long getmtime();

0 commit comments

Comments
 (0)