]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Change posix_error() to call err_errno().
authorGuido van Rossum <guido@python.org>
Sun, 14 Oct 1990 20:04:28 +0000 (20:04 +0000)
committerGuido van Rossum <guido@python.org>
Sun, 14 Oct 1990 20:04:28 +0000 (20:04 +0000)
Modules/posixmodule.c

index 0c1a487dba1b0c2e13afb29f5d4c2a6bebf9a28f..b7b2346e18fb2656c019ef4856a81d6d7124fa02 100644 (file)
@@ -72,18 +72,10 @@ static object *PosixError; /* Exception posix.error */
 
 /* Set a POSIX-specific error from errno, and return NULL */
 
-static object *
+extern object *
 posix_error()
 {
-       object *v = newtupleobject(2);
-       if (v != NULL) {
-               settupleitem(v, 0, newintobject((long)errno));
-               settupleitem(v, 1, newstringobject(strerror(errno)));
-       }
-       err_setval(PosixError, v);
-       if (v != NULL)
-               DECREF(v);
-       return NULL;
+       return err_errno(PosixError);
 }