Skip to content

Commit 91a8743

Browse files
committed
make globals const
1 parent abb6f26 commit 91a8743

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Include/internal/pycore_cfg.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ extern "C" {
1010

1111
#include "pycore_opcode_utils.h"
1212

13-
static _PyCompilerSrcLocation NO_LOCATION = {-1, -1, -1, -1};
13+
static const _PyCompilerSrcLocation NO_LOCATION = {-1, -1, -1, -1};
1414

1515
typedef struct {
1616
int i_opcode;

Python/cfg.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef _PyCfgBasicblock basicblock;
2626
typedef _PyCfgBuilder cfg_builder;
2727
typedef _PyCfgInstruction cfg_instr;
2828

29-
static jump_target_label NO_LABEL = {-1};
29+
static const jump_target_label NO_LABEL = {-1};
3030

3131
#define SAME_LABEL(L1, L2) ((L1).id == (L2).id)
3232
#define IS_LABEL(L) (!SAME_LABEL((L), (NO_LABEL)))

0 commit comments

Comments
 (0)