Commit e8f305ae authored by Guido van Rossum's avatar Guido van Rossum

Change posix_error() to call err_errno().

parent 2b654f74
...@@ -72,18 +72,10 @@ static object *PosixError; /* Exception posix.error */ ...@@ -72,18 +72,10 @@ static object *PosixError; /* Exception posix.error */
/* Set a POSIX-specific error from errno, and return NULL */ /* Set a POSIX-specific error from errno, and return NULL */
static object * extern object *
posix_error() posix_error()
{ {
object *v = newtupleobject(2); return err_errno(PosixError);
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;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment