The output MenuRef of GetMenuItemHierarchicalMenu() may be NULL.

This commit is contained in:
Just van Rossum 2002-01-03 12:16:18 +00:00
parent ad4f532f65
commit 8edfc542f0
2 changed files with 3 additions and 1 deletions

View File

@ -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

View File

@ -144,6 +144,8 @@ class MyScanner(Scanner):
([("void", "*", "OutMode"), ("long", "*", "InMode"),
("long", "*", "OutMode")],
[("VarVarOutBuffer", "*", "InOutMode")]),
([("MenuRef", 'outHierMenu', "OutMode")],
[("OptMenuRef", 'outHierMenu', "OutMode")]),
]
def writeinitialdefs(self):