mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
The output MenuRef of GetMenuItemHierarchicalMenu() may be NULL.
This commit is contained in:
parent
ad4f532f65
commit
8edfc542f0
2 changed files with 3 additions and 1 deletions
|
|
@ -1638,7 +1638,7 @@ static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject
|
|||
&outHierMenu);
|
||||
if (_err != noErr) return PyMac_Error(_err);
|
||||
_res = Py_BuildValue("O&",
|
||||
MenuObj_New, outHierMenu);
|
||||
OptMenuObj_New, outHierMenu);
|
||||
return _res;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -144,6 +144,8 @@ class MyScanner(Scanner):
|
|||
([("void", "*", "OutMode"), ("long", "*", "InMode"),
|
||||
("long", "*", "OutMode")],
|
||||
[("VarVarOutBuffer", "*", "InOutMode")]),
|
||||
([("MenuRef", 'outHierMenu', "OutMode")],
|
||||
[("OptMenuRef", 'outHierMenu', "OutMode")]),
|
||||
]
|
||||
|
||||
def writeinitialdefs(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue