mirror of https://github.com/python/cpython
fixed refcount leak in CreateNewWindow() and CreateWindowFromResource().
This commit is contained in:
parent
aee2d5f975
commit
84fca948c8
|
@ -3112,7 +3112,7 @@ static PyObject *Win_CreateNewWindow(PyObject *_self, PyObject *_args)
|
|||
&outWindow);
|
||||
if (_err != noErr) return PyMac_Error(_err);
|
||||
_res = Py_BuildValue("O&",
|
||||
WinObj_WhichWindow, outWindow);
|
||||
WinObj_New, outWindow);
|
||||
return _res;
|
||||
}
|
||||
|
||||
|
@ -3132,7 +3132,7 @@ static PyObject *Win_CreateWindowFromResource(PyObject *_self, PyObject *_args)
|
|||
&outWindow);
|
||||
if (_err != noErr) return PyMac_Error(_err);
|
||||
_res = Py_BuildValue("O&",
|
||||
WinObj_WhichWindow, outWindow);
|
||||
WinObj_New, outWindow);
|
||||
return _res;
|
||||
}
|
||||
|
||||
|
|
|
@ -136,6 +136,13 @@ class MyScanner(Scanner):
|
|||
([("void", "wStorage", "OutMode")],
|
||||
[("NullStorage", "*", "InMode")]),
|
||||
|
||||
# match FindWindowOfClass
|
||||
([("WindowRef", "outWindow", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")],
|
||||
[("ExistingWindowPtr", "*", "OutMode"), ("WindowPartCode", "outWindowPart", "OutMode")]),
|
||||
# then match CreateNewWindow and CreateWindowFromResource
|
||||
([("WindowRef", "outWindow", "OutMode")],
|
||||
[("WindowRef", "*", "*")]),
|
||||
|
||||
([("WindowPtr", "*", "OutMode")],
|
||||
[("ExistingWindowPtr", "*", "*")]),
|
||||
([("WindowRef", "*", "OutMode")], # Same, but other style headerfiles
|
||||
|
|
Loading…
Reference in New Issue