]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
On Windows, tempnam() is spelled with a leading underscore.
authorFred Drake <fdrake@acm.org>
Tue, 17 Jul 2001 20:37:36 +0000 (20:37 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 17 Jul 2001 20:37:36 +0000 (20:37 +0000)
Modules/posixmodule.c

index aec8caaf20bef7ee4d7df7a877306d8c4deff39d..f17b95af04e895ac217922cff356f61d274d9de6 100644 (file)
@@ -4211,7 +4211,11 @@ posix_tempnam(PyObject *self, PyObject *args)
 
     if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
         return NULL;
+#ifdef MS_WIN32
+    name = _tempnam(dir, pfx);
+#else
     name = tempnam(dir, pfx);
+#endif
     if (name == NULL)
         return PyErr_NoMemory();
     result = PyString_FromString(name);