pygobject r1055 - in trunk: . glib



Author: gjc
Date: Sun Apr  5 15:22:16 2009
New Revision: 1055
URL: http://svn.gnome.org/viewvc/pygobject?rev=1055&view=rev

Log:
Add support code for fixing: Bug 507174 â Convert from popt to GOption.

Modified:
   trunk/ChangeLog
   trunk/glib/pygoptioncontext.c

Modified: trunk/glib/pygoptioncontext.c
==============================================================================
--- trunk/glib/pygoptioncontext.c	(original)
+++ trunk/glib/pygoptioncontext.c	Sun Apr  5 15:22:16 2009
@@ -281,6 +281,12 @@
     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 @@
     { "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 },
 };
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]