File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -74,6 +74,8 @@ module sys
7474#include "clinic/sysmodule.c.h"
7575
7676
77+ #ifndef ABIFLAGS
78+
7779// XXX: remove this and related code after set sys.abiflags on Windows in 3.16.
7880static int
7981_warn_incoming_sys_abiflags_change ()
@@ -89,6 +91,8 @@ _warn_incoming_sys_abiflags_change()
8991 /*stack_level=*/ 1 );
9092}
9193
94+ #endif
95+
9296PyObject *
9397_PySys_GetRequiredAttr (PyObject * name )
9498{
@@ -163,6 +167,8 @@ _PySys_GetOptionalAttr(PyObject *name, PyObject **value)
163167#ifndef ABIFLAGS
164168 if (ret == 0 && _PyUnicode_EqualToASCIIString (name , "abiflags" )) {
165169 if (_warn_incoming_sys_abiflags_change () < 0 ) {
170+ Py_XDECREF (* value );
171+ * value = NULL ;
166172 return -1 ;
167173 }
168174 }
@@ -183,6 +189,8 @@ _PySys_GetOptionalAttrString(const char *name, PyObject **value)
183189#ifndef ABIFLAGS
184190 if (ret == 0 && strcmp (name , "abiflags" ) == 0 ) {
185191 if (_warn_incoming_sys_abiflags_change () < 0 ) {
192+ Py_XDECREF (* value );
193+ * value = NULL ;
186194 return -1 ;
187195 }
188196 }
You can’t perform that action at this time.
0 commit comments