summaryrefslogtreecommitdiffstats
path: root/Modules/_localemodule.c
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-03-19 17:11:33 (GMT)
committerGitHub <noreply@github.com>2020-03-19 17:11:33 (GMT)
commit13397ee47d23fda2e8d4bef40c1df986457673d1 (patch)
treec5eb038c21c7d261a7c589eb03794f99f431f186 /Modules/_localemodule.c
parent5a3a71dddbe80edc75a3a74ce3b7978cf8635901 (diff)
downloadcpython-13397ee47d23fda2e8d4bef40c1df986457673d1.zip
cpython-13397ee47d23fda2e8d4bef40c1df986457673d1.tar.gz
cpython-13397ee47d23fda2e8d4bef40c1df986457673d1.tar.bz2
bpo-39824: Convert PyModule_GetState() to get_module_state() (GH-19076)
Automerge-Triggered-By: @vstinner
Diffstat (limited to 'Modules/_localemodule.c')
-rw-r--r--Modules/_localemodule.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/Modules/_localemodule.c b/Modules/_localemodule.c
index d2202bc..0ce5dc5 100644
--- a/Modules/_localemodule.c
+++ b/Modules/_localemodule.c
@@ -775,25 +775,25 @@ static struct PyModuleDef_Slot _locale_slots[] = {
};
static int
-locale_traverse(PyObject *m, visitproc visit, void *arg)
+locale_traverse(PyObject *module, visitproc visit, void *arg)
{
- _locale_state *state = (_locale_state*)PyModule_GetState(m);
+ _locale_state *state = get_locale_state(module);
Py_VISIT(state->Error);
return 0;
}
static int
-locale_clear(PyObject *m)
+locale_clear(PyObject *module)
{
- _locale_state *state = (_locale_state*)PyModule_GetState(m);
+ _locale_state *state = get_locale_state(module);
Py_CLEAR(state->Error);
return 0;
}
static void
-locale_free(PyObject *m)
+locale_free(PyObject *module)
{
- locale_clear(m);
+ locale_clear(module);
}
static struct PyModuleDef _localemodule = {