Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cced0aa

Browse files
committed
SetListCellIndent() argument was guessed incorrectly. Fixed.
1 parent f02f4c8 commit cced0aa

2 files changed

Lines changed: 10 additions & 15 deletions

File tree

Mac/Modules/list/Listmodule.c

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -893,13 +893,14 @@ static PyObject *List_SetListCellIndent(_self, _args)
893893
PyObject *_res = NULL;
894894
ListHandle list;
895895
Point indent;
896-
if (!PyArg_ParseTuple(_args, "O&",
897-
ListObj_Convert, &list))
896+
if (!PyArg_ParseTuple(_args, "O&O&",
897+
ListObj_Convert, &list,
898+
PyMac_GetPoint, &indent))
898899
return NULL;
899900
SetListCellIndent(list,
900901
&indent);
901-
_res = Py_BuildValue("O&",
902-
PyMac_BuildPoint, indent);
902+
Py_INCREF(Py_None);
903+
_res = Py_None;
903904
return _res;
904905
}
905906

@@ -1039,7 +1040,7 @@ static PyMethodDef List_methods[] = {
10391040
{"SetListPort", (PyCFunction)List_SetListPort, 1,
10401041
"(ListHandle list, CGrafPtr port) -> None"},
10411042
{"SetListCellIndent", (PyCFunction)List_SetListCellIndent, 1,
1042-
"(ListHandle list) -> (Point indent)"},
1043+
"(ListHandle list, Point indent) -> None"},
10431044
{"SetListClickTime", (PyCFunction)List_SetListClickTime, 1,
10441045
"(ListHandle list, SInt32 time) -> None"},
10451046
{"SetListRefCon", (PyCFunction)List_SetListRefCon, 1,

Mac/Modules/list/listscan.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -74,16 +74,10 @@ def makerepairinstructions(self):
7474
([("void", "*", "OutMode"), ("short", "*", "OutMode")],
7575
[("VarOutBufferShortsize", "*", "InOutMode")]),
7676

77-
# ([("void", "wStorage", "OutMode")],
78-
# [("NullStorage", "*", "InMode")]),
79-
#
80-
# # GetKeys
81-
# ([('KeyMap', 'theKeys', 'InMode')],
82-
# [('*', '*', 'OutMode')]),
83-
#
84-
# # GetTicker
85-
# ([('unsigned long', '*', '*')],
86-
# [('unsigned_long', '*', '*')]),
77+
# SetListCellIndent doesn't have const
78+
([("Point", "indent", "OutMode")],
79+
[("Point_ptr", "indent", "InMode")]),
80+
8781
]
8882

8983
def writeinitialdefs(self):

0 commit comments

Comments
 (0)