| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent d6bdf6d commit e3cafeb
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -412,7 +412,6 @@ zoneinfo_clear_cache(PyObject *cls, PyObject *args, PyObject *kwargs) | |||
| 412 | 412 | } | |
| 413 | 413 | ||
| 414 | 414 | clear_strong_cache(type); | |
| 415 | - ZONEINFO_STRONG_CACHE = NULL; | ||
| 416 | 415 | } | |
| 417 | 416 | else { | |
| 418 | 417 | PyObject *item = NULL; | |
@@ -2471,6 +2470,7 @@ clear_strong_cache(const PyTypeObject *const type) | |||
| 2471 | 2470 | } | |
| 2472 | 2471 | ||
| 2473 | 2472 | strong_cache_free(ZONEINFO_STRONG_CACHE); | |
| 2473 | + ZONEINFO_STRONG_CACHE = NULL; | ||
| 2474 | 2474 | } | |
| 2475 | 2475 | ||
| 2476 | 2476 | static PyObject * | |
@@ -2525,6 +2525,7 @@ zoneinfo_init_subclass(PyTypeObject *cls, PyObject *args, PyObject **kwargs) | |||
| 2525 | 2525 | } | |
| 2526 | 2526 | ||
| 2527 | 2527 | PyObject_SetAttrString((PyObject *)cls, "_weak_cache", weak_cache); | |
| 2528 | + Py_DECREF(weak_cache); | ||
| 2528 | 2529 | Py_RETURN_NONE; | |
| 2529 | 2530 | } | |
| 2530 | 2531 | ||
@@ -2616,8 +2617,7 @@ module_free() | |||
| 2616 | 2617 | Py_CLEAR(ZONEINFO_WEAK_CACHE); | |
| 2617 | 2618 | } | |
| 2618 | 2619 | ||
| 2619 | - strong_cache_free(ZONEINFO_STRONG_CACHE); | ||
| 2620 | - ZONEINFO_STRONG_CACHE = NULL; | ||
| 2620 | + clear_strong_cache(&PyZoneInfo_ZoneInfoType); | ||
| 2621 | 2621 | } | |
| 2622 | 2622 | ||
| 2623 | 2623 | static int | |
| Back | FazBrowse Home | New Git URL |
0 commit comments