aboutsummaryrefslogtreecommitdiff
path: root/libs/newt/patches/python_memory_allocation.patch
blob: 4dd3b29ed9a783f3fd8c675325b954cab3849cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
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;
 
@@ -932,7 +932,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;
@@ -944,7 +944,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;