File: 400_python_memory_allocation.patch

package info (click to toggle)
newt 0.52.11-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 440 kB
  • ctags: 46
  • sloc: makefile: 214; python: 22; sh: 7
file content (30 lines) | stat: -rw-r--r-- 977 bytes parent folder | download
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
diff -ruN newt-0.52.11-old/snackmodule.c newt-0.52.11/snackmodule.c
--- newt-0.52.11-old/snackmodule.c	2008-07-30 13:42:55.000000000 +0100
+++ newt-0.52.11/snackmodule.c	2009-04-20 21:31:38.000000000 +0100
@@ -273,7 +273,7 @@
 static snackWidget * snackWidgetNew (void) {
     snackWidget * widget;
      
-    widget = PyObject_NEW(snackWidget, &snackWidgetType);
+    widget = PyObject_New(snackWidget, &snackWidgetType);
 
     widget->scs.cb = NULL;
     widget->scs.data = NULL;
@@ -790,7 +790,7 @@
     if (help == Py_None)
 	help = NULL;
 
-    form = PyObject_NEW(snackForm, &snackFormType);
+    form = PyObject_New(snackForm, &snackFormType);
     form->fo = newtForm(NULL, help, 0);
 
     return form;
@@ -802,7 +802,7 @@
 
     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;