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

Skip to content

Commit e4ab647

Browse files
committed
* Python/getmtime.c: Remove mac specifics (Mac subdirectory has
its own version now) * Python/bltinmodule.c (builtin_tuple): use pre-existing listtuple(v) for lists
1 parent f6971e2 commit e4ab647

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

Python/bltinmodule.c

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1178,19 +1178,8 @@ builtin_tuple(self, v)
11781178
INCREF(v);
11791179
return v;
11801180
}
1181-
if (is_listobject(v)) {
1182-
int n = getlistsize(v);
1183-
object *t = newtupleobject(n);
1184-
if (t != NULL) {
1185-
int i;
1186-
for (i = 0; i < n; i++) {
1187-
object *item = getlistitem(v, i);
1188-
INCREF(item);
1189-
settupleitem(t, i, item);
1190-
}
1191-
}
1192-
return t;
1193-
}
1181+
if (is_listobject(v))
1182+
return listtuple(v);
11941183
if (is_stringobject(v)) {
11951184
int n = getstringsize(v);
11961185
object *t = newtupleobject(n);

Python/getmtime.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,12 +30,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
3030
#include "config.h"
3131
#endif
3232

33-
#ifdef macintosh
34-
#include "stat.h"
35-
#else
3633
#include <sys/types.h>
3734
#include <sys/stat.h>
38-
#endif
3935

4036
long
4137
getmtime(path)

0 commit comments

Comments
 (0)