]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
* Python/getmtime.c: Remove mac specifics (Mac subdirectory has
authorGuido van Rossum <guido@python.org>
Tue, 30 Aug 1994 12:38:05 +0000 (12:38 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 30 Aug 1994 12:38:05 +0000 (12:38 +0000)
its own version now)
* Python/bltinmodule.c (builtin_tuple): use pre-existing
listtuple(v) for lists

Python/bltinmodule.c
Python/getmtime.c

index 67b7e26b840330e608a21fa31879c6f158704c50..b38ed5bbe6e7016101a96d619fb945f14e767606 100644 (file)
@@ -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);
index fa2fd0283407f250ccf341cb456b3fe82ba69ccc..7c8561062185685e7f1c943e1d77aacbde77c20b 100644 (file)
@@ -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)