|
Author: Thomas Viehmann <tv@beamnet.de>
|
|
Description: Fix for python memory handling
|
|
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445392
|
|
Last-Updated: 2014-06-11
|
|
Forwarded: no
|
|
|
|
--- a/snack.c
|
|
+++ b/snack.c
|
|
@@ -366,7 +366,7 @@ static PyTypeObject snackWidgetType = {
|
|
static snackWidget * snackWidgetNew (void) {
|
|
snackWidget * widget;
|
|
|
|
- widget = PyObject_NEW(snackWidget, &snackWidgetType);
|
|
+ widget = PyObject_New(snackWidget, &snackWidgetType);
|
|
if (!widget)
|
|
return NULL;
|
|
|
|
@@ -937,7 +937,7 @@ static snackForm * formCreate(PyObject *
|
|
if (help == Py_None)
|
|
help = NULL;
|
|
|
|
- form = PyObject_NEW(snackForm, &snackFormType);
|
|
+ form = PyObject_New(snackForm, &snackFormType);
|
|
form->fo = newtForm(NULL, help, 0);
|
|
|
|
return form;
|
|
@@ -949,7 +949,7 @@ static snackGrid * gridCreate(PyObject *
|
|
|
|
if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL;
|
|
|
|
- grid = PyObject_NEW(snackGrid, &snackGridType);
|
|
+ grid = PyObject_New(snackGrid, &snackGridType);
|
|
grid->grid = newtCreateGrid(cols, rows);
|
|
|
|
return grid;
|