8000 gh-115058: Replace types with a larger types · Eclips4/cpython@c7052a9 · GitHub
[go: up one dir, main page]

Skip to content

Commit c7052a9

Browse files
committed
pythongh-115058: Replace types with a larger types
1 parent 1b1f839 commit c7052a9

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Include/internal/pycore_interp.h

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ struct _stoptheworld_state {
6565
specific optimizations. */
6666
typedef struct _rare_events {
6767
/* Setting an 8000 object's class, obj.__class__ = ... */
68-
uint8_t set_class;
68+
uint16_t set_class;
6969
/* Setting the bases of a class, cls.__bases__ = ... */
70-
uint8_t set_bases;
70+
uint16_t set_bases;
7171
/* Setting the PEP 523 frame eval function, _PyInterpreterState_SetFrameEvalFunc() */
72-
uint8_t set_eval_frame_func;
72+
uint16_t set_eval_frame_func;
7373
/* Modifying the builtins, __builtins__.__dict__[var] = ... */
74-
uint8_t builtin_dict;
74+
uint16_t builtin_dict;
7575
/* Modifying a function, e.g. func.__defaults__ = ..., etc. */
76-
uint8_t func_modification;
76+
uint16_t func_modification;
7777
} _rare_events;
7878

7979
/* interpreter state */
@@ -376,7 +376,7 @@ PyAPI_FUNC(PyStatus) _PyInterpreterState_New(
376376
#define RARE_EVENT_INTERP_INC(interp, name) \
377377
do { \
378378
/* saturating add */ \
379-
if (interp->rare_events.name < UINT8_MAX) interp->rare_events.name++; \
379+
if (interp->rare_events.name < UINT16_MAX) interp->rare_events.name++; \
380380
RARE_EVENT_STAT_INC(name); \
381381
} while (0); \
382382

0 commit comments

Comments
 (0)
0