return NULL;
}
+static int minalloc_is_set = 0;
static int
_decimal_exec(PyObject *m)
mpd_reallocfunc = PyMem_Realloc;
mpd_callocfunc = mpd_callocfunc_em;
mpd_free = PyMem_Free;
- mpd_setminalloc(_Py_DEC_MINALLOC);
+
+ /* Suppress the warning caused by multi-phase initialization */
+ if (!minalloc_is_set) {
+ mpd_setminalloc(_Py_DEC_MINALLOC);
+ minalloc_is_set = 1;
+ }
decimal_state *state = get_module_state(m);
# explicitly protected, internal-only
Modules/_xxinterpchannelsmodule.c - _globals -
+# set once during module init
+Modules/_decimal/_decimal.c - minalloc_is_set -
+
##################################
## not significant