Message391934
| Author |
christian.heimes |
| Recipients |
christian.heimes, erlendaasland, pablogsal, serhiy.storchaka, shreyanavigyan, vstinner |
| Date |
2021年04月26日.13:47:31 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1619444851.95.0.165758327108.issue43916@roundup.psfhosted.org> |
| In-reply-to |
| Content |
I have had this workaround in _hashopenssl.c for a while. Can I get rid of the function with "{Py_tp_new, NULL}" or is there a more generic way to accomplish the same goal?
/* {Py_tp_new, NULL} doesn't block __new__ */
static PyObject *
_disabled_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
PyErr_Format(PyExc_TypeError,
"cannot create '%.100s' instances", _PyType_Name(type));
return NULL;
} |
|