~ubuntu-branches/ubuntu/gutsy/gnome-menus/gutsy-updates

« back to all changes in this revision

Viewing changes to python/gmenu.c

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Bacher, Baptiste Mille-Mathias
  • Date: 2007-06-18 12:12:41 UTC
  • mfrom: (1.1.15 upstream)
  • Revision ID: james.westby@ubuntu.com-20070618121241-sw5vxqurjsnfqold
Tags: 2.19.4-0ubuntu1
* debian/patches/08_python_default_version.patch:
  - use non versionned python binary (LP: #120658)

[ Baptiste Mille-Mathias ]
* New upstream version:
  - bugfixes
* debian/patches/70_reautogen.patch:
  - updated

Show diffs side-by-side

added added

removed removed

Lines of Context:
1497
1497
{
1498
1498
  PyObject *args;
1499
1499
  PyObject *ret;
 
1500
  PyGILState_STATE gstate;
 
1501
 
 
1502
  gstate = PyGILState_Ensure();
1500
1503
 
1501
1504
  args = PyTuple_New (callback->user_data ? 2 : 1);
1502
1505
 
1513
1516
 
1514
1517
  Py_XDECREF (ret);
1515
1518
  Py_DECREF (args);
 
1519
 
 
1520
  PyGILState_Release(gstate);
1516
1521
}
1517
1522
 
1518
1523
static PyObject *
1522
1527
  PyGMenuTree         *tree;
1523
1528
  PyGMenuTreeCallback *callback;
1524
1529
  PyObject            *pycallback;
1525
 
  PyObject            *pyuser_data;
 
1530
  PyObject            *pyuser_data = NULL;
1526
1531
 
1527
1532
  if (!PyArg_ParseTuple (args, "O|O:gmenu.Tree.add_monitor", &pycallback, &pyuser_data))
1528
1533
    return NULL;
 
1534
  if (!PyCallable_Check(pycallback))
 
1535
    {
 
1536
      PyErr_SetString(PyExc_TypeError, "callback must be callable");
 
1537
      return NULL;
 
1538
    }
1529
1539
 
1530
1540
  tree = (PyGMenuTree *) self;
1531
1541