* 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
This commit is contained in:
parent
f6971e2958
commit
e4ab6475f1
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue