Commit e4ab6475 authored by Guido van Rossum's avatar Guido van Rossum

* 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
parent f6971e29
......@@ -1178,19 +1178,8 @@ builtin_tuple(self, v)
INCREF(v);
return v;
}
if (is_listobject(v)) {
int n = getlistsize(v);
object *t = newtupleobject(n);
if (t != NULL) {
int i;
for (i = 0; i < n; i++) {
object *item = getlistitem(v, i);
INCREF(item);
settupleitem(t, i, item);
}
}
return t;
}
if (is_listobject(v))
return listtuple(v);
if (is_stringobject(v)) {
int n = getstringsize(v);
object *t = newtupleobject(n);
......
......@@ -30,12 +30,8 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include "config.h"
#endif
#ifdef macintosh
#include "stat.h"
#else
#include <sys/types.h>
#include <sys/stat.h>
#endif
long
getmtime(path)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment