tag 468979 patch pending
severity 468979 serious
tag 445392 +pending
thanks

Hi,

the bug exists, attached is a patch that removes the crashing.
It will be uploaded during the BSP next weekend unless you fix the bug first. I tested the patch using the peanuts.py example. It crashes after using OK without and does not with the patch applied.

Kind regards

T.
--
Thomas Viehmann, http://thomas.viehmann.net/
diff -u newt-0.52.2/debian/control newt-0.52.2/debian/control
--- newt-0.52.2/debian/control
+++ newt-0.52.2/debian/control
@@ -44,9 +44,9 @@
 Architecture: any
 Section: python
 Priority: standard
-XB-Python-Version: 2.3, 2.4
+XB-Python-Version: ${python:Versions}
 Provides: ${python:Provides}
-Depends: libnewt0.52 (=${Source-Version}) , python (>= 2.3), python (<< 2.5), 
${misc:Depends}
+Depends: libnewt0.52 (=${Source-Version}) , ${python:Depends}, ${misc:Depends}
 Description: A NEWT module for Python
  This module allows you to built a text UI for your Python scripts
  using newt.
diff -u newt-0.52.2/debian/rules newt-0.52.2/debian/rules
--- newt-0.52.2/debian/rules
+++ newt-0.52.2/debian/rules
@@ -199,12 +199,8 @@
        dh_installdirs -p $@ 
        dh_install -p $@ --sourcedir=$(BUILD_TREE)
        dh_strip -p $@
-       dh_makeshlibs -p $@
-       dh_link -p $@ usr/lib/python2.4/site-packages/snack.py 
usr/lib/python2.3/site-packages/snack.py
-       dh_link -p $@ usr/lib/python2.4/site-packages/_snackmodule.so 
usr/lib/python2.3/site-packages/_snackmodule.so
-       dh_python -p $@
        DH_PYCENTRAL=nomove dh_pycentral -p $@
-       dh_installdocs -p $@  -p $@ $(BUILD_TREE)/newt.spec
+       dh_installdocs -p $@ $(BUILD_TREE)/newt.spec
        # Currently disabled, as debian-test has been removed.
        # chmod +x 
debian/whiptail/usr/lib/debian-test/tests/whiptail/test-newt.sh/test-newt.sh
        dh_installchangelogs -p $@ 
diff -u newt-0.52.2/debian/changelog newt-0.52.2/debian/changelog
--- newt-0.52.2/debian/changelog
+++ newt-0.52.2/debian/changelog
@@ -1,3 +1,13 @@
+newt (0.52.2-11.2) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Apply ubuntu patch to use actually use pycentral.
+    Thanks to Steve Langasek for forwarding.
+    Closes: #445392.
+  * Fix python memory handling. Closes: #445392.
+
+ -- Thomas Viehmann <[EMAIL PROTECTED]>  Tue, 04 Mar 2008 23:33:17 +0100
+
 newt (0.52.2-11.1) unstable; urgency=medium
 
   * NMU
only in patch2:
unchanged:
--- newt-0.52.2.orig/debian/patches/400_python_memory_allocation.patch
+++ newt-0.52.2/debian/patches/400_python_memory_allocation.patch
@@ -0,0 +1,38 @@
+--- newt-0.52.2/snackmodule.c~ 2005-09-21 11:32:01.000000000 +0200
++++ newt-0.52.2/snackmodule.c  2008-03-04 23:41:13.000000000 +0100
+@@ -265,7 +265,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;
+@@ -750,7 +750,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;
+@@ -762,7 +762,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;
+@@ -925,7 +925,7 @@
+     Py_XDECREF (s->scs.cb);
+     Py_XDECREF (s->scs.data);
+ 
+-    PyMem_DEL(o);
++    PyObject_Del(o);
+ }
+ 
+ static PyObject * widgetAddCallback(snackWidget * s, PyObject * args) {

Reply via email to