You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.1 KiB

  1. Author: Thomas Viehmann <tv@beamnet.de>
  2. Description: Fix for python memory handling
  3. Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=445392
  4. Last-Updated: 2014-06-11
  5. Forwarded: no
  6. --- a/snack.c
  7. +++ b/snack.c
  8. @@ -366,7 +366,7 @@ static PyTypeObject snackWidgetType = {
  9. static snackWidget * snackWidgetNew (void) {
  10. snackWidget * widget;
  11. - widget = PyObject_NEW(snackWidget, &snackWidgetType);
  12. + widget = PyObject_New(snackWidget, &snackWidgetType);
  13. if (!widget)
  14. return NULL;
  15. @@ -932,7 +932,7 @@ static snackForm * formCreate(PyObject *
  16. if (help == Py_None)
  17. help = NULL;
  18. - form = PyObject_NEW(snackForm, &snackFormType);
  19. + form = PyObject_New(snackForm, &snackFormType);
  20. form->fo = newtForm(NULL, help, 0);
  21. return form;
  22. @@ -944,7 +944,7 @@ static snackGrid * gridCreate(PyObject *
  23. if (!PyArg_ParseTuple(args, "ii", &cols, &rows)) return NULL;
  24. - grid = PyObject_NEW(snackGrid, &snackGridType);
  25. + grid = PyObject_New(snackGrid, &snackGridType);
  26. grid->grid = newtCreateGrid(cols, rows);
  27. return grid;