1 /* -*- Mode: C; c-basic-offset: 4 -*- */
3 Copyright (C) 2008 Luke Kenneth Carlson Leigh
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 GNU General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; if not, write to the Free Software
17 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
23 #define NO_IMPORT_PYGOBJECT
24 #include <pygtk/pygtk.h>
25 #include <pygobject.h>
38 import gobject.GObject as PyGObject_Type
40 override gjs_value_execute
42 _wrap_gjs_value_execute(PyGObject *self, PyObject *args, PyObject *kwargs)
44 static char *kwlist[] = { "script", NULL };
46 gchar *exception = NULL;
49 if (!PyArg_ParseTupleAndKeywords(args, kwargs,"s:GjsValue.execute", kwlist, &script))
52 ret = gjs_value_execute(GJS_VALUE(self->obj), script, &exception);
57 PyExc_RuntimeError, /* TODO: better exception */
66 /* pygobject_new handles NULL checking */
67 return pygobject_new((GObject *)ret);