8000 Remove Py_DECREF(...) of objects in args · EvanLiUAV/matplotlib-cpp@3fc3148 · GitHub
[go: up one dir, main page]

Skip to content

Commit 3fc3148

Browse files
committed
Remove Py_DECREF(...) of objects in args
1 parent bfa2300 commit 3fc3148

File tree

1 file changed

+0
-10
lines changed

1 file changed

+0
-10
lines changed

matplotlibcpp.h

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,6 @@ namespace matplotlibcpp {
137137

138138
PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_annotate, args, kwargs);
139139

140-
Py_DECREF(xy);
141140
Py_DECREF(args);
142141
Py_DECREF(kwargs);
143142

@@ -206,7 +205,6 @@ namespace matplotlibcpp {
206205
PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_hist, plot_args, kwargs);
207206

208207

209-
Py_DECREF(ylist);
210208
Py_DECREF(plot_args);
211209
Py_DECREF(kwargs);
212210
if(res) Py_DECREF(res);
@@ -233,7 +231,6 @@ namespace matplotlibcpp {
233231
PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_hist, plot_args, kwargs);
234232

235233

236-
Py_DECREF(ylist);
237234
Py_DECREF(plot_args);
238235
Py_DECREF(kwargs);
239236
if(res) Py_DECREF(res);
@@ -262,8 +259,6 @@ namespace matplotlibcpp {
262259

263260
PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_plot, plot_args);
264261

265-
Py_DECREF(xlist);
266-
Py_DECREF(ylist);
267262
Py_DECREF(plot_args);
268263
if(res) Py_DECREF(res);
269264

@@ -289,7 +284,6 @@ namespace matplotlibcpp {
289284
PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_plot, plot_args, kwargs);
290285

291286
Py_DECREF(kwargs);
292-
Py_DECREF(ylist);
293287
Py_DECREF(plot_args);
294288
if(res) Py_DECREF(res);
295289

@@ -318,8 +312,6 @@ namespace matplotlibcpp {
318312
PyObject* res = PyObject_Call(detail::_interpreter::get().s_python_function_plot, plot_args, kwargs);
319313

320314
Py_DECREF(kwargs);
321-
Py_DECREF(xlist);
322-
Py_DECREF(ylist);
323315
Py_DECREF(plot_args);
324316
if(res) Py_DECREF(res);
325317

@@ -361,7 +353,6 @@ namespace matplotlibcpp {
361353
PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_ylim, args);
362354
if(!res) throw std::runtime_error("Call to ylim() failed.");
363355

364-
Py_DECREF(list);
365356
Py_DECREF(args);
366357
Py_DECREF(res);
367358
}
@@ -379,7 +370,6 @@ namespace matplotlibcpp {
379370
PyObject* res = PyObject_CallObject(detail::_interpreter::get().s_python_function_xlim, args);
380371
if(!res) throw std::runtime_error("Call to xlim() failed.");
381372

382-
Py_DECREF(list);
383373
Py_DECREF(args);
384374
Py_DECREF(res);
385375
}

0 commit comments

Comments
 (0)
0