Changeset 3364 for trunk/essentials/dev-lang/python/Python/traceback.c
- Timestamp:
- May 21, 2007, 2:27:53 AM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/essentials/dev-lang/python/Python/traceback.c
r3225 r3364 140 140 PyObject *path; 141 141 char *tail = strrchr(filename, SEP); 142 #ifdef ALTSEP 143 char *tail2 = strrchr(filename, ALTSEP); 144 if (!tail || tail2 > tail) 145 tail = tail2; 146 #endif 147 #ifdef DRVSEP 148 if (!tail && HAS_DRV(filename)) 149 tail = strchr(filename, DRVSEP); 150 #endif 142 151 if (tail == NULL) 143 152 tail = filename; … … 164 173 if (strlen(namebuf) != len) 165 174 continue; /* v contains '\0' */ 166 if (len > 0 && namebuf[len-1] != SEP)175 if (len > 0 && IS_SEP(namebuf[len-1])) 167 176 namebuf[len++] = SEP; 168 177 strcpy(namebuf+len, tail);
Note:
See TracChangeset
for help on using the changeset viewer.