@@ -95,19 +95,9 @@ void CPythonListViewImpl::DrawItem(LPDRAWITEMSTRUCT lpDIS)
95
95
obDC = Py_None;
96
96
}
97
97
98
- PyObject *args = helper.build_args (" iiiiiiO(iiii)O" , lpDIS->CtlType , lpDIS->CtlID , lpDIS->itemID , lpDIS->itemAction ,
99
- lpDIS->itemState , lpDIS->hwndItem , obDC, lpDIS->rcItem .left , lpDIS->rcItem .top ,
100
- lpDIS->rcItem .right , lpDIS->rcItem .bottom , obData);
101
- ASSERT (args);
102
- if (!args) {
103
- gui_print_error ();
104
- PyErr_SetString (ui_module_error, " DrawItem could not convert args - handler not called." );
105
- return ; // not too much we can do
106
- }
107
- // make the call.
108
- helper.call_args (args);
109
- // Cleanup.
110
- Py_DECREF (args);
98
+ helper.call_args (" iiiiiiO(iiii)O" , lpDIS->CtlType , lpDIS->CtlID , lpDIS->itemID , lpDIS->itemAction ,
99
+ lpDIS->itemState , lpDIS->hwndItem , obDC, lpDIS->rcItem .left , lpDIS->rcItem .top ,
100
+ lpDIS->rcItem .right , lpDIS->rcItem .bottom , obData);
111
101
// The DC is no longer valid.
112
102
Python_delete_assoc (pDC);
113
103
}
@@ -141,19 +131,9 @@ void CPythonTreeViewImpl::DrawItem(LPDRAWITEMSTRUCT lpDIS)
141
131
obDC = Py_None;
142
132
}
143
133
144
- PyObject *args = helper.build_args (" iiiiiiO(iiii)O" , lpDIS->CtlType , lpDIS->CtlID , lpDIS->itemID , lpDIS->itemAction ,
145
- lpDIS->itemState , lpDIS->hwndItem , obDC, lpDIS->rcItem .left , lpDIS->rcItem .top ,
146
- lpDIS->rcItem .right , lpDIS->rcItem .bottom , obData);
147
- ASSERT (args);
148
- if (!args) {
149
- gui_print_error ();
150
- PyErr_SetString (ui_module_error, " DrawItem could not convert args - handler not called." );
151
- return ; // not too much we can do
152
- }
153
- // make the call.
154
- helper.call_args (args);
155
- // Cleanup.
156
- Py_DECREF (args);
134
+ helper.call_args (" iiiiiiO(iiii)O" , lpDIS->CtlType , lpDIS->CtlID , lpDIS->itemID , lpDIS->itemAction ,
135
+ lpDIS->itemState , lpDIS->hwndItem , obDC, lpDIS->rcItem .left , lpDIS->rcItem .top ,
136
+ lpDIS->rcItem .right , lpDIS->rcItem .bottom , obData);
157
137
// The DC is no longer valid.
158
138
Python_delete_assoc (pDC);
159
139
}
0 commit comments