| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…onGH-125281) Lock `ZoneInfoType` to protect accesses to `ZONEINFO_STRONG_CACHE`. Refactor the `tp_new` handler to use Argument Clinic so that we can just use `@critical_section` annotations on the relevant functions. Also use `PyDict_SetDefaultRef` instead of `PyDict_SetDefault` when inserting into the `TIMEDELTA_CACHE`. (cherry picked from commit f1d33db) Co-authored-by: Sam Gross <colesbury@gmail.com>
| zoneinfo_ZoneInfo(PyTypeObject *type, PyObject *args, PyObject *kwargs) | ||
| { | ||
| PyObject *return_value = NULL; | ||
| #if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE) |
There was a problem hiding this comment.
suggestion: Preprocessing maybe placed in the first column. This allows you to keep your style consistent with the other extension modules.
for example:
cpython/Modules/syslogmodule.c
Lines 234 to 244 in f1d33db
zoneinfo_ZoneInfo(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{
PyObject *return_value = NULL;
#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
Sorry, something went wrong.
There was a problem hiding this comment.
This is a generated file
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
Lock ZoneInfoType to protect accesses to ZONEINFO_STRONG_CACHE.
Refactor the tp_new handler to use Argument Clinic so that we can just
use @critical_section annotations on the relevant functions.
Also use PyDict_SetDefaultRef instead of PyDict_SetDefault when
inserting into the TIMEDELTA_CACHE.
(cherry picked from commit f1d33db)
Co-authored-by: Sam Gross colesbury@gmail.com