summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1990-10-14 20:04:28 (GMT)
committerGuido van Rossum <guido@python.org>1990-10-14 20:04:28 (GMT)
commite8f305aec6f2f2ee6b43e4efb9ae9d9bb306312a (patch)
tree53f8beaf74e222149f154bfbf414dee5ad1e9f48 /Modules
parent2b654f74c23de18c25a9e0b36979322ef461223c (diff)
downloadcpython-e8f305aec6f2f2ee6b43e4efb9ae9d9bb306312a.zip
cpython-e8f305aec6f2f2ee6b43e4efb9ae9d9bb306312a.tar.gz
cpython-e8f305aec6f2f2ee6b43e4efb9ae9d9bb306312a.tar.bz2
Change posix_error() to call err_errno().
Diffstat (limited to 'Modules')
-rw-r--r--Modules/posixmodule.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index 0c1a487..b7b2346 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -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);
}