PyErr_SetString(PyExc_ValueError, "embedded null character");
goto exit;
}
+ Py_BEGIN_CRITICAL_SECTION(self);
return_value = mmap_mmap_set_name_impl((mmap_object *)self, name);
+ Py_END_CRITICAL_SECTION();
exit:
return return_value;
#ifndef MMAP_MMAP_MADVISE_METHODDEF
#define MMAP_MMAP_MADVISE_METHODDEF
#endif /* !defined(MMAP_MMAP_MADVISE_METHODDEF) */
-/*[clinic end generated code: output=8389e3c8e3db3a78 input=a9049054013a1b77]*/
+/*[clinic end generated code: output=1122b93314aebc5c input=a9049054013a1b77]*/
}
/*[clinic input]
+@critical_section
mmap.mmap.set_name
name: str
static PyObject *
mmap_mmap_set_name_impl(mmap_object *self, const char *name)
-/*[clinic end generated code: output=1edaf4fd51277760 input=6c7dd91cad205f07]*/
+/*[clinic end generated code: output=1edaf4fd51277760 input=7c0e2a17ca6d1adc]*/
{
#if defined(MAP_ANONYMOUS) && defined(__linux__)
const char *prefix = "cpython:mmap:";