@@ -12473,7 +12473,7 @@ typedef struct {
12473
12473
} DirEntry ;
12474
12474
12475
12475
static PyObject *
12476
- DirEntry_new (PyTypeObject * type , PyObject * args , PyObject * kwargs )
12476
+ _disabled_new (PyTypeObject * type , PyObject * args , PyObject * kwargs )
12477
12477
{
12478
12478
PyErr_Format (PyExc_TypeError ,
12479
12479
"cannot create '%.100s' instances" , _PyType_Name (type ));
@@ -12789,7 +12789,7 @@ static PyMethodDef DirEntry_methods[] = {
12789
12789
};
12790
12790
12791
12791
static PyType_Slot DirEntryType_slots [] = {
12792
- {Py_tp_new , DirEntry_new },
12792
+ {Py_tp_new , _disabled_new },
12793
12793
{Py_tp_dealloc , DirEntry_dealloc },
12794
12794
{Py_tp_repr , DirEntry_repr },
12795
12795
{Py_tp_methods , DirEntry_methods },
@@ -13197,14 +13197,6 @@ ScandirIterator_finalize(ScandirIterator *iterator)
13197
13197
PyErr_Restore (error_type , error_value , error_traceback );
13198
13198
}
13199
13199
13200
- static PyObject *
13201
- ScandirIterator_new (PyTypeObject * type , PyObject * args , PyObject * kwargs )
13202
- {
13203
- PyErr_Format (PyExc_TypeError ,
13204
- "cannot create '%.100s' instances" , _PyType_Name (type ));
13205
- return NULL ;
13206
- }
13207
-
13208
13200
static void
13209
13201
ScandirIterator_dealloc (ScandirIterator * iterator )
13210
13202
{
@@ -13224,7 +13216,7 @@ static PyMethodDef ScandirIterator_methods[] = {
13224
13216
};
13225
13217
13226
13218
static PyType_Slot ScandirIteratorType_slots [] = {
13227
- {Py_tp_new , ScandirIterator_new },
13219
+ {Py_tp_new , _disabled_new },
13228
13220
{Py_tp_dealloc , ScandirIterator_dealloc },
13229
13221
{Py_tp_finalize , ScandirIterator_finalize },
13230
13222
{Py_tp_iter , PyObject_SelfIter },
0 commit comments