mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
gh-99300: Replace Py_INCREF() with Py_NewRef() (#99513)
Replace Py_INCREF() and Py_XINCREF() using a cast with Py_NewRef() and Py_XNewRef().
This commit is contained in:
parent
ea88d34de2
commit
3ed8803ef5
12 changed files with 22 additions and 44 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue