diff options
author | Guido van Rossum <guido@python.org> | 1993-01-09 17:18:52 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-01-09 17:18:52 (GMT) |
commit | 775f4dacbc8163f085e07ea4195cf5b67dce5124 (patch) | |
tree | 8db650ae8f063e834f576a6f86f2cfdd982dffed /Modules/posixmodule.c | |
parent | d513f0bcb6e743c7569cefce597ad748b9a54bbc (diff) | |
download | cpython-775f4dacbc8163f085e07ea4195cf5b67dce5124.zip cpython-775f4dacbc8163f085e07ea4195cf5b67dce5124.tar.gz cpython-775f4dacbc8163f085e07ea4195cf5b67dce5124.tar.bz2 |
* Makefile: use cp -r to install the library
* ceval.c: use #ifdef COMPAT_HACKS instead of #if 0
* Makefile: fix to make clmodule.c compile;
make config.o dependent on libpython.a (so date is always correct)
* timemodule.c: now sleep() also takes a float argument.
* posixmodule.c: added nice().
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index e861d08..bab0c59 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -1,6 +1,6 @@ /*********************************************************** -Copyright 1991, 1992 by Stichting Mathematisch Centrum, Amsterdam, The -Netherlands. +Copyright 1991, 1992, 1993 by Stichting Mathematisch Centrum, +Amsterdam, The Netherlands. All Rights Reserved @@ -358,6 +358,23 @@ posix_mkdir(self, args) return posix_strint(args, mkdir); } +#ifndef MSDOS +static object * +posix_nice(self, args) + object *self; + object *args; +{ + int increment, value; + + if (!getargs(args, "i", &increment)) + return NULL; + value = nice(increment); + if (value == -1) + return posix_error(); + return newintobject((long) value); +} +#endif + #ifdef i386 int rename(from, to) @@ -919,6 +936,9 @@ static struct methodlist posix_methods[] = { {"listdir", posix_listdir}, {"lstat", posix_lstat}, {"mkdir", posix_mkdir}, +#ifndef MSDOS + {"nice", posix_nice}, +#endif {"readlink", posix_readlink}, {"rename", posix_rename}, {"rmdir", posix_rmdir}, |