Commit 5b471ffd authored by Just van Rossum's avatar Just van Rossum

The output MenuRef of GetMenuItemHierarchicalMenu() may be NULL.

parent 33f6835e
...@@ -1638,7 +1638,7 @@ static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject ...@@ -1638,7 +1638,7 @@ static PyObject *MenuObj_GetMenuItemHierarchicalMenu(MenuObject *_self, PyObject
&outHierMenu); &outHierMenu);
if (_err != noErr) return PyMac_Error(_err); if (_err != noErr) return PyMac_Error(_err);
_res = Py_BuildValue("O&", _res = Py_BuildValue("O&",
MenuObj_New, outHierMenu); OptMenuObj_New, outHierMenu);
return _res; return _res;
} }
#endif #endif
......
...@@ -144,6 +144,8 @@ class MyScanner(Scanner): ...@@ -144,6 +144,8 @@ class MyScanner(Scanner):
([("void", "*", "OutMode"), ("long", "*", "InMode"), ([("void", "*", "OutMode"), ("long", "*", "InMode"),
("long", "*", "OutMode")], ("long", "*", "OutMode")],
[("VarVarOutBuffer", "*", "InOutMode")]), [("VarVarOutBuffer", "*", "InOutMode")]),
([("MenuRef", 'outHierMenu', "OutMode")],
[("OptMenuRef", 'outHierMenu', "OutMode")]),
] ]
def writeinitialdefs(self): def writeinitialdefs(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment