summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog9
-rw-r--r--glib/pygoptioncontext.c7
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 180539a..c3f6fb3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2009-04-05 Tristan Hill <stan@saticed.me.uk>
+
+ reviewed by: Gustavo J. A. M. Carneiro.
+
+ * glib/pygoptioncontext.c (pyg_option_get_context): Add a
+ semi-private method to return the option context C object from an
+ option context wrapper. Used in gnome-python for fixing Bug
+ #507174.
+
2009-04-05 Gustavo J. A. M. Carneiro <gjc@gnome.org>
* gobject/pygtype.c (pyg_value_from_pyobject): Bug 577999 –
diff --git a/glib/pygoptioncontext.c b/glib/pygoptioncontext.c
index 4d9a0a5..92ba901 100644
--- a/glib/pygoptioncontext.c
+++ b/glib/pygoptioncontext.c
@@ -281,6 +281,12 @@ pyg_option_context_compare(PyGOptionContext *self, PyGOptionContext *context)
return -1;
}
+static PyObject *
+pyg_option_get_context(PyGOptionContext *self)
+{
+ return PyCObject_FromVoidPtr(self->context, NULL);
+}
+
static PyMethodDef pyg_option_context_methods[] = {
{ "parse", (PyCFunction)pyg_option_context_parse, METH_VARARGS | METH_KEYWORDS },
{ "set_help_enabled", (PyCFunction)pyg_option_context_set_help_enabled, METH_VARARGS | METH_KEYWORDS },
@@ -290,6 +296,7 @@ static PyMethodDef pyg_option_context_methods[] = {
{ "set_main_group", (PyCFunction)pyg_option_context_set_main_group, METH_VARARGS | METH_KEYWORDS },
{ "get_main_group", (PyCFunction)pyg_option_context_get_main_group, METH_NOARGS },
{ "add_group", (PyCFunction)pyg_option_context_add_group, METH_VARARGS | METH_KEYWORDS },
+ { "_get_context", (PyCFunction)pyg_option_get_context, METH_NOARGS },
{ NULL, NULL, 0 },
};