Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit aec006b

Browse files
authored
gh-135755: Make Py_MAX_SCRIPT_PATH_SIZE private (#138350)
1 parent b3ff316 commit aec006b

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Include/cpython/pystate.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ typedef int (*Py_tracefunc)(PyObject *, PyFrameObject *, int, PyObject *);
2828
#define PyTrace_OPCODE 7
2929

3030
/* Remote debugger support */
31-
#define Py_MAX_SCRIPT_PATH_SIZE 512
31+
#define _Py_MAX_SCRIPT_PATH_SIZE 512
3232
typedef struct {
3333
int32_t debugger_pending_call;
34-
char debugger_script_path[Py_MAX_SCRIPT_PATH_SIZE];
34+
char debugger_script_path[_Py_MAX_SCRIPT_PATH_SIZE];
3535
} _PyRemoteDebuggerSupport;
3636

3737
typedef struct _err_stackitem {

Include/internal/pycore_debug_offsets.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,7 +368,7 @@ typedef struct _Py_DebugOffsets {
368368
.remote_debugging_enabled = offsetof(PyInterpreterState, config.remote_debug), \
369369
.debugger_pending_call = offsetof(_PyRemoteDebuggerSupport, debugger_pending_call), \
370370
.debugger_script_path = offsetof(_PyRemoteDebuggerSupport, debugger_script_path), \
371-
.debugger_script_path_size = Py_MAX_SCRIPT_PATH_SIZE, \
371+
.debugger_script_path_size = _Py_MAX_SCRIPT_PATH_SIZE, \
372372
}, \
373373
}
374374

Modules/posixmodule.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -686,7 +686,7 @@ reset_remotedebug_data(PyThreadState *tstate)
686686
{
687687
tstate->remote_debugger_support.debugger_pending_call = 0;
688688
memset(tstate->remote_debugger_support.debugger_script_path, 0,
689-
Py_MAX_SCRIPT_PATH_SIZE);
689+
_Py_MAX_SCRIPT_PATH_SIZE);
690690
}
691691

692692

0 commit comments

Comments
 (0)