Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-71587: Establish global state in _datetime #110475

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review: rename global_state => _datetime_global_state
  • Loading branch information
erlend-aasland committed Oct 11, 2023
commit 6863f763c07909fa3e921e933d2ed68091b603a6
4 changes: 2 additions & 2 deletions 4 Modules/_datetimemodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,9 @@ typedef struct {
PyObject *epoch;
} datetime_state;

static datetime_state global_state;
static datetime_state _datetime_global_state;

#define GLOBAL_STATE() (&global_state)
#define GLOBAL_STATE() (&_datetime_global_state)
erlend-aasland marked this conversation as resolved.
Show resolved Hide resolved

/*[clinic input]
module datetime
Expand Down
2 changes: 1 addition & 1 deletion 2 Tools/c-analyzer/cpython/globals-to-fix.tsv
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ Modules/_datetimemodule.c datetime_strptime module -
Modules/_ctypes/_ctypes.c - _ctypes_ptrtype_cache -
Modules/_ctypes/_ctypes.c - global_state -
Modules/_ctypes/ctypes.h - global_state -
Modules/_datetimemodule.c - global_state -
Modules/_datetimemodule.c - _datetime_global_state -
Modules/_tkinter.c - tcl_lock -
Modules/_tkinter.c - excInCmd -
Modules/_tkinter.c - valInCmd -
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.