Skip to content

Commit 91569eb

Browse files
authored
gh-160247: Reduce padding in _PyInstructionSequence (#160271)
1 parent 797087c commit 91569eb

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

‎Include/internal/pycore_instruction_sequence.h‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ typedef struct instruction_sequence {
4040
/* Map of a label id to instruction offset (index into s_instrs).
4141
* If s_labelmap is NULL, then each label id is the offset itself.
4242
*/
43-
int *s_labelmap;
4443
int s_labelmap_size;
44+
int *s_labelmap;
4545

4646
/* PyList of instruction sequences of nested functions */
4747
PyObject *s_nested;
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Reduce padding in the internal instruction sequence structure, saving 8 bytes
2+
per instance on 64-bit platforms. Patch by Shamil Abdulaev.

0 commit comments

Comments
 (0)