cpython/Doc/includes
Victor Stinner 7e3f09cad9
gh-99537: Use Py_SETREF() function in C code (#99656)
Fix potential race condition in code patterns:

* Replace "Py_DECREF(var); var = new;" with "Py_SETREF(var, new);"
* Replace "Py_XDECREF(var); var = new;" with "Py_XSETREF(var, new);"
* Replace "Py_CLEAR(var); var = new;" with "Py_XSETREF(var, new);"

Other changes:

* Replace "old = var; var = new; Py_DECREF(var)"
  with "Py_SETREF(var, new);"
* Replace "old = var; var = new; Py_XDECREF(var)"
  with "Py_XSETREF(var, new);"
* And remove the "old" variable.
2022-11-22 14:22:22 +01:00
..
custom.c gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769) 2022-04-17 20:39:32 -07:00
custom2.c gh-99537: Use Py_SETREF() function in C code (#99656) 2022-11-22 14:22:22 +01:00
custom3.c gh-99537: Use Py_SETREF() function in C code (#99656) 2022-11-22 14:22:22 +01:00
custom4.c gh-99537: Use Py_SETREF() function in C code (#99656) 2022-11-22 14:22:22 +01:00
dbpickle.py Issue 11929: Minor whitespace clean-ups. 2011-04-26 13:55:55 -07:00
diff.py gh-97669: Move difflib examples to Doc/includes/ (#97964) 2022-10-07 10:57:48 -07:00
email-alternative.py Update Email library documentation example (GH-3720) 2017-09-24 09:12:53 -07:00
email-dir.py bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) 2019-11-15 11:03:46 +02:00
email-headers.py gh-84623: Remove unused imports (#94132) 2022-06-22 19:14:27 +02:00
email-mime.py gh-91520: Rewrite imghdr inlining for clarity and completeness (#91521) 2022-04-14 17:48:59 -07:00
email-read-alternative.py gh-82530: Create blank function instead of invalid import for email example (#97529) 2022-09-26 00:06:11 -04:00
email-simple.py bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) 2019-11-15 11:03:46 +02:00
email-unpack.py bpo-38351: Modernize email examples from %-formatting to f-strings (GH-17162) 2019-11-15 11:03:46 +02:00
minidom-example.py Update old-style strings to f-strings (GH-30384) 2022-01-04 01:25:56 -08:00
mp_newtype.py Issue #8713: Support alternative start methods in multiprocessing on Unix. 2013-08-14 15:35:41 +01:00
mp_pool.py Issue #8713: Support alternative start methods in multiprocessing on Unix. 2013-08-14 15:35:41 +01:00
mp_workers.py Issue #8713: Support alternative start methods in multiprocessing on Unix. 2013-08-14 15:35:41 +01:00
ndiff.py gh-97669: Move difflib examples to Doc/includes/ (#97964) 2022-10-07 10:57:48 -07:00
run-func.c Doc: define PY_SSIZE_T_CLEAN always (GH-12794) 2019-04-13 10:46:21 +09:00
setup.py doc: fix compile error on "shoddy" example extension (GH-215) 2017-02-21 21:51:46 +09:00
sublist.c gh-91118: Fix docstrings that do not honor --without-doc-strings (#31769) 2022-04-17 20:39:32 -07:00
test.py bpo-33201: Modernize "Extension types" doc (GH-6337) 2018-04-07 18:14:03 +02:00
turtle-star.py Issue #7061: Added a 'Turtle star' sidebar 2010-11-09 18:40:03 +00:00
typestruct.h bpo-43908: Document Static Types in the C API (GH-25710) 2021-04-29 10:26:34 +02:00
tzinfo_examples.py gh-96959: Update HTTP links which are redirected to HTTPS (#98039) 2022-10-07 11:52:45 -07:00
wasm-notavail.rst gh-95451: Update docs for wasm32-emscripten and -wasi platforms (GH-95452) 2022-08-02 21:00:41 +02:00