diff options
| author | Victor Stinner <vstinner@python.org> | 2022-11-16 10:39:47 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-16 10:39:47 +0100 |
| commit | 3ed8803ef59f80e03c40b100b04c2e13f138ceed (patch) | |
| tree | ec9ce18edd242485d4e3198d8e62924e1616c4ea /Modules/syslogmodule.c | |
| parent | ea88d34de27ba2b3acaeb03c7dc7829dff40ea5c (diff) | |
| download | cpython-git-3ed8803ef59f80e03c40b100b04c2e13f138ceed.tar.gz | |
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99513)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef()
and Py_XNewRef().
Diffstat (limited to 'Modules/syslogmodule.c')
| -rw-r--r-- | Modules/syslogmodule.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/Modules/syslogmodule.c b/Modules/syslogmodule.c index 5137d01c68..23833b7285 100644 --- a/Modules/syslogmodule.c +++ b/Modules/syslogmodule.c @@ -205,8 +205,7 @@ syslog_syslog_impl(PyObject *module, int group_left_1, int priority, /* Incref ident, because it can be decrefed if syslog.openlog() is * called when the GIL is released. */ - PyObject *ident = S_ident_o; - Py_XINCREF(ident); + PyObject *ident = Py_XNewRef(S_ident_o); #ifdef __APPLE__ // gh-98178: On macOS, libc syslog() is not thread-safe syslog(priority, "%s", message); |
