mirror of
https://github.com/python/cpython.git
synced 2025-08-12 04:49:01 +00:00
On Windows, tempnam() is spelled with a leading underscore.
This commit is contained in:
parent
832181e5dc
commit
78b71c2ad3
1 changed files with 4 additions and 0 deletions
|
@ -4211,7 +4211,11 @@ posix_tempnam(PyObject *self, PyObject *args)
|
||||||
|
|
||||||
if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
|
if (!PyArg_ParseTuple(args, "|zz:tempnam", &dir, &pfx))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
#ifdef MS_WIN32
|
||||||
|
name = _tempnam(dir, pfx);
|
||||||
|
#else
|
||||||
name = tempnam(dir, pfx);
|
name = tempnam(dir, pfx);
|
||||||
|
#endif
|
||||||
if (name == NULL)
|
if (name == NULL)
|
||||||
return PyErr_NoMemory();
|
return PyErr_NoMemory();
|
||||||
result = PyString_FromString(name);
|
result = PyString_FromString(name);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue