Replace Py_INCREF() and Py_XINCREF() with Py_NewRef() and
Py_XNewRef() in test C files of the PC/ directory.
result = PyBytes_FromStringAndSize(sval, ssize);
break;
case VT_EMPTY:
- Py_INCREF(Py_None);
- result = Py_None;
+ result = Py_NewRef(Py_None);
break;
default:
PyErr_Format(PyExc_NotImplementedError, "result of type %d", type);
winreg_HKEYType___enter___impl(PyHKEYObject *self)
/*[clinic end generated code: output=52c34986dab28990 input=c40fab1f0690a8e2]*/
{
- Py_XINCREF(self);
- return self;
+ return (PyHKEYObject*)Py_XNewRef(self);
}
support it natively, we should handle the bits. */
default:
if (retDataSize == 0) {
- Py_INCREF(Py_None);
- obData = Py_None;
+ obData = Py_NewRef(Py_None);
}
else
obData = PyBytes_FromStringAndSize(