[pygobject] Drop some dead code from gi/_glib/glibmodule.c
- From: Martin Pitt <martinpitt src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] Drop some dead code from gi/_glib/glibmodule.c
- Date: Sun, 28 Oct 2012 21:39:11 +0000 (UTC)
commit 057b3d3791e6f1947004f2482c0ae40529de03ae
Author: Martin Pitt <martinpitt gnome org>
Date: Sun Oct 28 17:41:03 2012 +0100
Drop some dead code from gi/_glib/glibmodule.c
gi/_glib/glibmodule.c | 45 ---------------------------------------------
1 files changed, 0 insertions(+), 45 deletions(-)
---
diff --git a/gi/_glib/glibmodule.c b/gi/_glib/glibmodule.c
index 68abc78..b360ec1 100644
--- a/gi/_glib/glibmodule.c
+++ b/gi/_glib/glibmodule.c
@@ -41,51 +41,6 @@
/* ---------------- glib module functions -------------------- */
-struct _PyGChildData {
- PyObject *func;
- PyObject *data;
-};
-
-static gint
-get_handler_priority(gint *priority, PyObject *kwargs)
-{
- Py_ssize_t len, pos;
- PyObject *key, *val;
-
- /* no keyword args? leave as default */
- if (kwargs == NULL) return 0;
-
- len = PyDict_Size(kwargs);
- if (len == 0) return 0;
-
- if (len != 1) {
- PyErr_SetString(PyExc_TypeError,
- "expecting at most one keyword argument");
- return -1;
- }
- pos = 0;
- PyDict_Next(kwargs, &pos, &key, &val);
- if (!PYGLIB_PyUnicode_Check(key)) {
- PyErr_SetString(PyExc_TypeError,
- "keyword argument name is not a string");
- return -1;
- }
-
- if (strcmp(PYGLIB_PyUnicode_AsString(key), "priority") != 0) {
- PyErr_SetString(PyExc_TypeError,
- "only 'priority' keyword argument accepted");
- return -1;
- }
-
- *priority = PYGLIB_PyLong_AsLong(val);
- if (PyErr_Occurred()) {
- PyErr_Clear();
- PyErr_SetString(PyExc_ValueError, "could not get priority value");
- return -1;
- }
- return 0;
-}
-
static PyObject *
pyglib_threads_init(PyObject *unused, PyObject *args, PyObject *kwargs)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]