Skip to content

Commit 211d043

Browse files
sergey-miryanovkumaraditya303vstinner
authored
Apply suggestions from code review
Co-authored-by: Kumar Aditya <[email protected]> Co-authored-by: Victor Stinner <[email protected]>
1 parent 7a61ed3 commit 211d043

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Include/internal/pycore_typeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ typedef int (*_py_validate_type)(PyTypeObject *);
148148
extern int _PyType_Validate(PyTypeObject *ty, _py_validate_type validate, unsigned int *tp_version);
149149
extern int _PyType_CacheGetItemForSpecialization(PyHeapTypeObject *ht, PyObject *descriptor, uint32_t tp_version);
150150

151-
// Precalculates count of non-unique slots and fills wrapperbase::name_count.
151+
// Precalculates count of non-unique slots and fills wrapperbase.name_count.
152152
extern int _PyType_InitSlotDefs(PyInterpreterState *interp);
153153

154154
#ifdef __cplusplus

Objects/typeobject.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11311,7 +11311,7 @@ static pytype_slotdef slotdefs[] = {
1131111311

1131211312
/* Stores the number of times where slotdefs has elements with same name.
1131311313
This counter precalculated by _PyType_InitSlotDefs when main
11314-
interprepter starts. */
11314+
interpreter starts. */
1131511315
static uint8_t slotdefs_name_counts[Py_ARRAY_LENGTH(slotdefs)];
1131611316

1131711317
/* Given a type pointer and an offset gotten from a slotdef entry, return a
@@ -11700,7 +11700,7 @@ update_all_slots(PyTypeObject* type)
1170011700
int
1170111701
_PyType_InitSlotDefs(PyInterpreterState *interp)
1170211702
{
11703-
if (interp != interp->runtime->interpreters.main) {
11703+
if (!_Py_IsMainInterpreter(interp)) {
1170411704
return 0;
1170511705
}
1170611706
PyObject *bytearray = NULL;

0 commit comments

Comments
 (0)