Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add comment on preparing special slots
  • Loading branch information
encukou committed Jun 10, 2022
commit 06fe302f9bdd6737e8e28cfe4169e540ed3b7e5b
5 changes: 5 additions & 0 deletions Objects/typeobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -3411,6 +3411,11 @@ PyType_FromMetaclass(PyTypeObject *metaclass, PyObject *module,
char *_ht_tpname = NULL;
int r;

/* Prepare slots that need special handling.
* Keep in mind that a slot can be given multiple times:
* if that would cause trouble (leaks, UB, ...), raise an exception.
*/

const PyType_Slot *slot;
Py_ssize_t nmembers = 0;
Py_ssize_t weaklistoffset, dictoffset, vectorcalloffset;
Expand Down