mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
bpo-35451: Fix reference counting for sys.warnoptions and sys._xoptions. (GH-11063)
This commit is contained in:
parent
f46eccd0ff
commit
72ff7b4c00
1 changed files with 0 additions and 2 deletions
|
@ -1774,7 +1774,6 @@ get_warnoptions(void)
|
||||||
* call optional for embedding applications, thus making this
|
* call optional for embedding applications, thus making this
|
||||||
* reachable again.
|
* reachable again.
|
||||||
*/
|
*/
|
||||||
Py_XDECREF(warnoptions);
|
|
||||||
warnoptions = PyList_New(0);
|
warnoptions = PyList_New(0);
|
||||||
if (warnoptions == NULL)
|
if (warnoptions == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -1864,7 +1863,6 @@ get_xoptions(void)
|
||||||
* call optional for embedding applications, thus making this
|
* call optional for embedding applications, thus making this
|
||||||
* reachable again.
|
* reachable again.
|
||||||
*/
|
*/
|
||||||
Py_XDECREF(xoptions);
|
|
||||||
xoptions = PyDict_New();
|
xoptions = PyDict_New();
|
||||||
if (xoptions == NULL)
|
if (xoptions == NULL)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue