Mercurial > cpython-lru_cache-weakref
diff Mac/Modules/macmodule.c @ 3405:c283447b985f legacy-trunk
Mods by Guido: mkdir 2nd arg optional and remove as alias for unlink.
| author | Jack Jansen <jack.jansen@cwi.nl> |
|---|---|
| date | Wed, 21 Feb 1996 12:33:50 +0000 |
| parents | 116db7347d01 |
| children | 578ca302a598 |
line wrap: on
line diff
--- a/Mac/Modules/macmodule.c Tue Feb 20 16:36:10 1996 +0000 +++ b/Mac/Modules/macmodule.c Wed Feb 21 12:33:50 1996 +0000 @@ -345,7 +345,18 @@ object *self; object *args; { - return mac_strint(args, mkdir); + int res; + char *path; + int mode = 0777; /* Unused */ + if (!newgetargs(args, "s|i", &path, &mode)) + return NULL; + BGN_SAVE + res = mkdir(path, mode); + END_SAVE + if (res < 0) + return mac_error(); + INCREF(None); + return None; } static object * @@ -545,7 +556,7 @@ {"getcwd", mac_getcwd}, {"listdir", mac_listdir, 0}, {"lseek", mac_lseek}, - {"mkdir", mac_mkdir}, + {"mkdir", mac_mkdir, 1}, {"open", mac_open}, {"read", mac_read}, {"rename", mac_rename}, @@ -553,6 +564,7 @@ {"stat", mac_stat}, {"xstat", mac_xstat}, {"sync", mac_sync}, + {"remove", mac_unlink}, {"unlink", mac_unlink}, {"write", mac_write}, #ifdef MALLOC_DEBUG
