File tree 1 file changed +8
-14
lines changed
1 file changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -3145,21 +3145,15 @@ PyType_GetSlot(PyTypeObject *type, int slot)
3145
3145
return NULL ;
3146
3146
}
3147
3147
3148
- for (int i = 1 ; i < slots_len ; i ++ ) {
3149
- if (i != slot ) {
3150
- continue ;
3151
- }
3152
- parent_slot = * (void * * )((char * )type + pyslot_offsets [i ].slot_offset );
3153
- if (parent_slot == NULL ) {
3154
- return NULL ;
3155
- }
3156
- /* Return slot directly if there have no sub slot. */
3157
- if (pyslot_offsets [i ].subslot_offset == -1 ) {
3158
- return parent_slot ;
3159
- }
3160
- return * (void * * )((char * )parent_slot + pyslot_offsets [i ].subslot_offset );
3148
+ parent_slot = * (void * * )((char * )type + pyslot_offsets [slot ].slot_offset );
3149
+ if (parent_slot == NULL ) {
3150
+ return NULL ;
3161
3151
}
3162
- return NULL ;
3152
+ /* Return slot directly if we have no sub slot. */
3153
+ if (pyslot_offsets [slot ].subslot_offset == -1 ) {
3154
+ return parent_slot ;
3155
+ }
3156
+ return * (void * * )((char * )parent_slot + pyslot_offsets [slot ].subslot_offset );
3163
3157
}
3164
3158
3165
3159
PyObject *
You can’t perform that action at this time.
0 commit comments