Use -Wno-write-strings with python files; removed (char*)"foo" casts

master
Yevgen Muntyan 2007-05-30 21:56:58 -05:00
parent 286c2c09f6
commit 6230bf6c72
24 changed files with 155 additions and 150 deletions

View File

@ -78,7 +78,7 @@ else
fi
fi
m4_foreach([wname],[missing-field-initializers, unused, sign-compare],[dnl
m4_foreach([wname],[missing-field-initializers, unused, sign-compare, write-strings],[dnl
m4_define([_moo_WNAME],[MOO_W_NO_[]m4_bpatsubst(m4_toupper(wname),-,_)])
_moo_WNAME=
if $_MOO_GCC; then

View File

@ -5,7 +5,7 @@
<debug>
<build_dir>build/debug</build_dir>
<configure>
<args>--enable-debug=full --enable-all-warnings --enable-libmoo --with-mooterm --enable-libmoo-headers --enable-project --enable-canvas</args>
<args>--enable-debug=full --enable-all-warnings --enable-libmoo --with-mooterm --enable-libmoo-headers --enable-project --enable-canvas --prefix=$PREFIX</args>
<vars>
<var name="CFLAGS">-g</var>
</vars>

View File

@ -64,7 +64,8 @@ AM_CFLAGS = \
$(MOO_CFLAGS) \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON_INCLUDES) \
$(PYGTK_CFLAGS)
$(PYGTK_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)
py25_cflags = \
-I.. \
@ -73,6 +74,7 @@ py25_cflags = \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON25_INCLUDES) \
$(PYGTK25_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)
-DMOO_PYTHON_MODULE_DLL_NAME=\"pymoo.dll\"
py24_cflags = \
@ -82,6 +84,7 @@ py24_cflags = \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON24_INCLUDES) \
$(PYGTK24_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)
-DMOO_PYTHON_MODULE_DLL_NAME=\"pymoo.dll\"
libmoomod_la_SOURCES = $(libmoomod_la_sources)

View File

@ -61,7 +61,7 @@ class WrapperInfo:
for kw in keywords:
if keyword.iskeyword(kw):
kw = kw + '_'
self.kwlist.append('(char*) "%s"' % kw)
self.kwlist.append('"%s"' % kw)
class ArgType:
def write_param(self, ptype, pname, pdflt, pnull, info):

View File

@ -97,7 +97,7 @@ class Wrapper:
'static PyTypeObject Py%(typename)s_Type = {\n'
' PyObject_HEAD_INIT(NULL)\n'
' 0, /* ob_size */\n'
' (char*) "%(classname)s", /* tp_name */\n'
' "%(classname)s", /* tp_name */\n'
' sizeof(%(tp_basicsize)s), /* tp_basicsize */\n'
' 0, /* tp_itemsize */\n'
' /* methods */\n'
@ -162,8 +162,8 @@ class Wrapper:
)
parse_tmpl = (
' if (!PyArg_ParseTupleAndKeywords(args, kwargs,'
'(char*) "%(typecodes)s:%(name)s"%(parselist)s))\n'
' if (!PyArg_ParseTupleAndKeywords(args, kwargs, '
'"%(typecodes)s:%(name)s"%(parselist)s))\n'
' return %(errorreturn)s;\n'
)
@ -174,7 +174,7 @@ class Wrapper:
)
methdef_tmpl = (
' { (char*) "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n'
' { "%(name)s", (PyCFunction)%(cname)s, %(flags)s,\n'
' %(docstring)s },\n'
)
@ -668,7 +668,7 @@ class Wrapper:
'is currently not supported */\n' % vars())
else:
self.fp.write('''
o = PyObject_GetAttrString((PyObject *) pyclass, (char*) "%(do_name)s");
o = PyObject_GetAttrString((PyObject *) pyclass, "%(do_name)s");
if (o == NULL)
PyErr_Clear();
else {
@ -722,7 +722,7 @@ class Wrapper:
"Could not write getter for %s.%s: %s\n"
% (self.objinfo.c_name, fname, exc_info()))
if gettername != '0' or settername != '0':
getsets.append(' { (char*) "%s", (getter)%s, (setter)%s, NULL, NULL },\n' %
getsets.append(' { "%s", (getter)%s, (setter)%s, NULL, NULL },\n' %
(fixname(fname), gettername, settername))
if not getsets:
@ -883,7 +883,7 @@ class GObjectWrapper(Wrapper):
def py_str_list_to_c(arg):
if arg:
return "{" + ", ".join(
map(lambda s: '(char*) "' + s + '"', arg)) + ", NULL }"
map(lambda s: '"' + s + '"', arg)) + ", NULL }"
else:
return "{ NULL }"
@ -919,7 +919,7 @@ class GObjectWrapper(Wrapper):
print >> out, ' return -1;'
print >> out
out.write(" if (!PyArg_ParseTupleAndKeywords(args, kwargs, ")
template = '(char*) "'
template = '"'
if mandatory_arguments:
template += "O"*len(mandatory_arguments)
if optional_arguments:
@ -955,7 +955,7 @@ class GObjectWrapper(Wrapper):
out.write(
' if (!PyArg_ParseTupleAndKeywords(args, kwargs,\n'
' (char*) ":%s.__init__",\n'
' ":%s.__init__",\n'
' kwlist))\n'
' return -1;\n'
'\n'
@ -1085,7 +1085,7 @@ class GInterfaceWrapper(GObjectWrapper):
self.fp.write((
' py_method = pytype? PyObject_GetAttrString('
'(PyObject *) pytype, (char*) "%(do_name)s") : NULL;\n'
'(PyObject *) pytype, "%(do_name)s") : NULL;\n'
' if (py_method && !PyObject_TypeCheck(py_method, '
'&PyCFunction_Type)) {\n'
' iface->%(name)s = %(cname)s;\n'
@ -1341,7 +1341,7 @@ class SourceWriter:
self.fp.write(' PyObject *module;\n\n')
for module in bymod:
self.fp.write(
' if ((module = PyImport_ImportModule((char*) "%s")) != NULL) {\n'
' if ((module = PyImport_ImportModule("%s")) != NULL) {\n'
% module)
self.fp.write(
' PyObject *moddict = PyModule_GetDict(module);\n\n')
@ -1404,7 +1404,7 @@ class SourceWriter:
self.fp.write(
' pygobject_register_class(d, "' + obj.c_name +
'", ' + obj.typecode + ', &Py' + obj.c_name +
'_Type, Py_BuildValue((char*) "(' + 'O' * len(bases) + ')", ' +
'_Type, Py_BuildValue("(' + 'O' * len(bases) + ')", ' +
string.join(map(lambda s: '&Py'+s+'_Type', bases), ', ') +
'));\n')
else:

View File

@ -10,7 +10,7 @@ def unescape(s):
return s.replace('\r', '\\r').replace('\n', '\\n')
def make_docstring(lines):
return "(char *) " + '\n'.join(['"%s"' % unescape(s) for s in lines])
return '\n'.join(['"%s"' % unescape(s) for s in lines])
# New Parameter class, wich emulates a tuple for compatibility reasons
class Parameter(object):

View File

@ -269,7 +269,7 @@ class ReverseWrapper(object):
failure_expression="!py_retval")
else:
self.add_declaration("PyObject *py_method;")
self.write_code("py_method = PyObject_GetAttrString(%s, (char*) \"%s\");"
self.write_code("py_method = PyObject_GetAttrString(%s, \"%s\");"
% (self.called_pyobj, self.method_name),
cleanup="Py_DECREF(py_method);",
failure_expression="!py_method")
@ -294,11 +294,11 @@ class ReverseWrapper(object):
if len(self.pyret_parse_items) == 1:
## if retval is one item only, pack it in a tuple so we
## can use PyArg_ParseTuple as usual..
self.write_code('py_retval = Py_BuildValue((char*) "(N)", py_retval);')
self.write_code('py_retval = Py_BuildValue("(N)", py_retval);')
if len(self.pyret_parse_items) > 0:
## Parse return values using PyArg_ParseTuple
self.write_code(code=None, failure_expression=(
'!PyArg_ParseTuple(py_retval, (char*) "%s", %s)' % (
'!PyArg_ParseTuple(py_retval, "%s", %s)' % (
"".join([format for format, param in self.pyret_parse_items]),
", ".join([param for format, param in self.pyret_parse_items]))))

View File

@ -28,7 +28,7 @@ moo_python_api_run_simple_string (const char *str)
{
PyObject *dict, *main_mod;
g_return_val_if_fail (str != NULL, NULL);
main_mod = PyImport_AddModule ((char*)"__main__");
main_mod = PyImport_AddModule ("__main__");
dict = PyModule_GetDict (main_mod);
return (MooPyObject*) PyRun_String (str, Py_file_input, dict, dict);
}
@ -39,16 +39,16 @@ moo_python_api_create_script_dict (const char *name)
{
PyObject *dict, *builtins;
builtins = PyImport_ImportModule ((char*) "__builtin__");
builtins = PyImport_ImportModule ("__builtin__");
g_return_val_if_fail (builtins != NULL, NULL);
dict = PyDict_New ();
PyDict_SetItemString (dict, (char*) "__builtins__", builtins);
PyDict_SetItemString (dict, "__builtins__", builtins);
if (name)
{
PyObject *py_name = PyString_FromString (name);
PyDict_SetItemString (dict, (char*) "__name__", py_name);
PyDict_SetItemString (dict, "__name__", py_name);
Py_XDECREF (py_name);
}
@ -135,8 +135,8 @@ moo_python_api_run_code (const char *str,
{
Py_DECREF (ret);
if (PyMapping_HasKeyString ((PyObject*) locals, (char*) "__retval__"))
ret = PyMapping_GetItemString ((PyObject*) locals, (char*) "__retval__");
if (PyMapping_HasKeyString ((PyObject*) locals, "__retval__"))
ret = PyMapping_GetItemString ((PyObject*) locals, "__retval__");
else
ret = NULL;
}

View File

@ -31,7 +31,7 @@ sys_path_add_dir (const char *dir)
PyObject *path;
PyObject *s;
path = PySys_GetObject ((char*) "path");
path = PySys_GetObject ("path");
if (!path)
{
@ -58,7 +58,7 @@ sys_path_remove_dir (const char *dir)
PyObject *path;
int i;
path = PySys_GetObject ((char*) "path");
path = PySys_GetObject ("path");
if (!path || !PyList_Check (path))
return;
@ -196,7 +196,7 @@ load_python_plugin (const char *plugin_file,
if (!(mod = load_file (plugin_file)))
return;
py_plugin_type = PyObject_GetAttrString (mod, (char*) "__plugin__");
py_plugin_type = PyObject_GetAttrString (mod, "__plugin__");
if (!py_plugin_type)
{

View File

@ -34,7 +34,7 @@ sys_path_add_dir (const char *dir)
g_return_val_if_fail (dir != NULL, FALSE);
path = PySys_GetObject ((char*)"path");
path = PySys_GetObject ("path");
if (!path)
{
@ -59,7 +59,7 @@ sys_path_add_dir (const char *dir)
return FALSE;
}
if (PySys_SetObject ((char*)"path", new_path) != 0)
if (PySys_SetObject ("path", new_path) != 0)
{
PyErr_Print ();
Py_DECREF (new_path);
@ -79,7 +79,7 @@ sys_path_remove_dir (const char *dir)
g_return_if_fail (dir != NULL);
path = PySys_GetObject ((char*) "path");
path = PySys_GetObject ("path");
if (!path)
{
@ -145,7 +145,7 @@ MOO_MODULE_INIT_FUNC_DECL
dlldir = NULL;
}
moo_mod = PyImport_ImportModule ((char*) "moo");
moo_mod = PyImport_ImportModule ("moo");
if (dlldir)
{

View File

@ -22,7 +22,7 @@ init_pygtk_mod (void)
PyObject *mdict;
PyObject *cobject;
if (!(gobject = PyImport_ImportModule ((char*) "gobject")))
if (!(gobject = PyImport_ImportModule ("gobject")))
return;
mdict = PyModule_GetDict (gobject);
@ -37,7 +37,7 @@ init_pygtk_mod (void)
_PyGObject_API = (struct _PyGObject_Functions *) PyCObject_AsVoidPtr (cobject);
if (!(pygtk = PyImport_ImportModule((char*) "gtk._gtk")))
if (!(pygtk = PyImport_ImportModule("gtk._gtk")))
return;
mdict = PyModule_GetDict (pygtk);
@ -76,8 +76,7 @@ check_pygtk_version (const char *module,
if (!version)
return FALSE;
if (!PyArg_ParseTuple (version, (char*) "iii",
&found_major, &found_minor, &found_micro))
if (!PyArg_ParseTuple (version, "iii", &found_major, &found_minor, &found_micro))
{
PyErr_Print ();
return FALSE;

View File

@ -351,7 +351,7 @@ _moo_py_file_write (PyObject *self, PyObject *args)
char *string;
MooPyFile *file = (MooPyFile *) self;
if (!PyArg_ParseTuple (args, (char*) "s", &string))
if (!PyArg_ParseTuple (args, "s", &string))
return NULL;
if (!file->write_func)
@ -363,9 +363,9 @@ _moo_py_file_write (PyObject *self, PyObject *args)
static PyMethodDef MooPyFile_methods[] = {
{ (char*) "close", (PyCFunction) _moo_py_file_close, METH_NOARGS, NULL },
{ (char*) "flush", (PyCFunction) _moo_py_file_flush, METH_NOARGS, NULL },
{ (char*) "write", (PyCFunction) _moo_py_file_write, METH_VARARGS, NULL },
{ "close", (PyCFunction) _moo_py_file_close, METH_NOARGS, NULL },
{ "flush", (PyCFunction) _moo_py_file_flush, METH_NOARGS, NULL },
{ "write", (PyCFunction) _moo_py_file_write, METH_VARARGS, NULL },
{ NULL, NULL, 0, NULL }
};
@ -373,7 +373,7 @@ static PyMethodDef MooPyFile_methods[] = {
static PyTypeObject MooPyFile_Type = {
PyObject_HEAD_INIT(NULL)
0, /* ob_size */
(char*) "MooPyFile", /* tp_name */
"MooPyFile", /* tp_name */
sizeof (MooPyFile), /* tp_basicsize */
0, /* tp_itemsize */
/* methods */

View File

@ -220,7 +220,8 @@ AM_CFLAGS = \
$(MOO_CFLAGS) \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON_INCLUDES) \
$(PYGTK_CFLAGS)
$(PYGTK_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)
libmoopygtk25_la_CFLAGS = \
-I../.. \
@ -228,7 +229,8 @@ libmoopygtk25_la_CFLAGS = \
$(MOO_CFLAGS) \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON25_INCLUDES) \
$(PYGTK25_CFLAGS)
$(PYGTK25_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)
libmoopygtk24_la_CFLAGS = \
-I../.. \
@ -236,4 +238,5 @@ libmoopygtk24_la_CFLAGS = \
$(MOO_CFLAGS) \
$(MOO_DEBUG_CFLAGS) \
$(PYTHON24_INCLUDES) \
$(PYGTK24_CFLAGS)
$(PYGTK24_CFLAGS) \
$(MOO_W_NO_WRITE_STRINGS)

View File

@ -19,7 +19,7 @@
#include "moopython/pygtk/canvas-mod.h"
static char *moo_canvas_module_doc = (char*) "_foo_canvas module.";
static char *moo_canvas_module_doc = "_foo_canvas module.";
gboolean
@ -27,8 +27,8 @@ _moo_canvas_mod_init (void)
{
PyObject *mod;
mod = Py_InitModule3 ((char*) "foocanvas", _moo_canvas_functions, moo_canvas_module_doc);
PyImport_AddModule ((char*) "moo.canvas");
mod = Py_InitModule3 ("foocanvas", _moo_canvas_functions, moo_canvas_module_doc);
PyImport_AddModule ("moo.canvas");
if (!mod)
return FALSE;
@ -45,7 +45,7 @@ _moo_canvas_mod_init (void)
if (!code)
return FALSE;
fake_mod = PyImport_ExecCodeModule ((char*) "moo.canvas", code);
fake_mod = PyImport_ExecCodeModule ("moo.canvas", code);
Py_DECREF (code);
if (!fake_mod)

View File

@ -118,19 +118,19 @@ arg_parse_two_points (PyObject *args,
double *y2,
const char *func_name)
{
if (PyArg_ParseTuple (args, (char*) "(dddd)",
if (PyArg_ParseTuple (args, "(dddd)",
x1, y1, x2, y2))
return TRUE;
PyErr_Clear ();
if (PyArg_ParseTuple (args, (char*) "dddd",
if (PyArg_ParseTuple (args, "dddd",
x1, y1, x2, y2))
return TRUE;
PyErr_Clear ();
if (PyArg_ParseTuple (args, (char*) "(dd)(dd)",
if (PyArg_ParseTuple (args, "(dd)(dd)",
x1, y1, x2, y2))
return TRUE;
PyErr_Clear ();
if (PyArg_ParseTuple (args, (char*) "((dd)(dd))",
if (PyArg_ParseTuple (args, "((dd)(dd))",
x1, y1, x2, y2))
return TRUE;
PyErr_Clear ();
@ -145,10 +145,10 @@ arg_parse_point (PyObject *args,
double *y,
const char *func_name)
{
if (PyArg_ParseTuple (args, (char*) "(dd)", x, y))
if (PyArg_ParseTuple (args, "(dd)", x, y))
return TRUE;
PyErr_Clear ();
if (PyArg_ParseTuple (args, (char*) "dd", x, y))
if (PyArg_ParseTuple (args, "dd", x, y))
return TRUE;
PyErr_Clear ();
PyErr_Format (PyExc_TypeError, "%s: arguments must (a tuple of) two numbers",
@ -162,10 +162,10 @@ arg_parse_point_i (PyObject *args,
int *y,
const char *func_name)
{
if (PyArg_ParseTuple (args, (char*) "(ii)", x, y))
if (PyArg_ParseTuple (args, "(ii)", x, y))
return TRUE;
PyErr_Clear ();
if (PyArg_ParseTuple (args, (char*) "ii", x, y))
if (PyArg_ParseTuple (args, "ii", x, y))
return TRUE;
PyErr_Clear ();
PyErr_Format (PyExc_TypeError, "%s: arguments must (a tuple of) two numbers",
@ -293,7 +293,7 @@ _wrap_foo_canvas_get_color (PyGObject *self, PyObject *args)
const char *spec;
GdkColor color;
if (!PyArg_ParseTuple (args, (char*) "s:FooCanvas.get_color", &spec))
if (!PyArg_ParseTuple (args, "s:FooCanvas.get_color", &spec))
return NULL;
if (foo_canvas_get_color (FOO_CANVAS (self->obj), spec, &color))
@ -349,7 +349,7 @@ _wrap_foo_canvas_get_miter_points (G_GNUC_UNUSED PyGObject *self, PyObject *args
double mx1, my1, mx2, my2;
double width;
if (!PyArg_ParseTuple (args, (char*) "(dd)(dd)(dd)d:foo_canvas_get_miter_points",
if (!PyArg_ParseTuple (args, "(dd)(dd)(dd)d:foo_canvas_get_miter_points",
&x1, &y1, &x2, &y2, &x3, &y3, &width))
return NULL;
@ -368,7 +368,7 @@ _wrap_foo_canvas_get_butt_points (G_GNUC_UNUSED PyGObject *self, PyObject *args)
gboolean project;
double mx1, my1, mx2, my2;
if (!PyArg_ParseTuple (args, (char*) "(dd)(dd)di:foo_canvas_get_butt_points",
if (!PyArg_ParseTuple (args, "(dd)(dd)di:foo_canvas_get_butt_points",
&x1, &y1, &x2, &y2, &width, &project))
return NULL;
@ -387,7 +387,7 @@ _wrap_foo_canvas_polygon_to_point (G_GNUC_UNUSED PyGObject *self, PyObject *args
double dist;
int i;
if (!PyArg_ParseTuple (args, (char*) "O(dd):foo_canvas_polygon_to_point",
if (!PyArg_ParseTuple (args, "O(dd):foo_canvas_polygon_to_point",
&py_points, &x, &y))
return NULL;
@ -426,7 +426,7 @@ _wrap_foo_canvas_points_new (PyGBoxed *self, PyObject *args)
FooCanvasPoints *points;
PyObject *py_points;
if (!PyArg_ParseTuple (args, (char*) "O:FooCanvasPoints.__init__", &py_points))
if (!PyArg_ParseTuple (args, "O:FooCanvasPoints.__init__", &py_points))
{
PyErr_Clear ();
py_points = args;

View File

@ -51,7 +51,7 @@ static PyMethodDef _moo_functions[] = {
{NULL, NULL, 0, NULL}
};
static char *_moo_module_doc = (char*)"_moo module.";
static char *_moo_module_doc = "_moo module.";
static PyObject *
@ -91,45 +91,45 @@ _moo_pygtk_init (void)
py_object_from_moo_py_object,
py_object_to_moo_py_object);
_moo_module = Py_InitModule3 ((char*) "_moo", _moo_functions, _moo_module_doc);
_moo_module = Py_InitModule3 ("_moo", _moo_functions, _moo_module_doc);
if (PyErr_Occurred ())
return FALSE;
PyImport_AddModule ((char*) "moo");
PyImport_AddModule ("moo");
PyModule_AddObject (_moo_module, (char*) "version", moo_version());
PyModule_AddObject (_moo_module, (char*) "detailed_version", moo_detailed_version());
PyModule_AddObject (_moo_module, "version", moo_version());
PyModule_AddObject (_moo_module, "detailed_version", moo_detailed_version());
#ifdef MOO_BUILD_UTILS
if (!_moo_utils_mod_init ())
return FALSE;
submod = PyImport_ImportModule ((char*) "moo.utils");
PyModule_AddObject (_moo_module, (char*) "utils", submod);
submod = PyImport_ImportModule ("moo.utils");
PyModule_AddObject (_moo_module, "utils", submod);
#endif
#ifdef MOO_BUILD_TERM
if (!_moo_term_mod_init ())
return FALSE;
submod = PyImport_ImportModule ((char*) "moo.term");
PyModule_AddObject (_moo_module, (char*) "term", submod);
submod = PyImport_ImportModule ("moo.term");
PyModule_AddObject (_moo_module, "term", submod);
#endif
#ifdef MOO_BUILD_EDIT
if (!_moo_edit_mod_init ())
return FALSE;
submod = PyImport_ImportModule ((char*) "moo.edit");
PyModule_AddObject (_moo_module, (char*) "edit", submod);
submod = PyImport_ImportModule ("moo.edit");
PyModule_AddObject (_moo_module, "edit", submod);
#endif
#ifdef MOO_BUILD_CANVAS
if (!_moo_canvas_mod_init ())
return FALSE;
submod = PyImport_ImportModule ((char*) "moo.canvas");
PyModule_AddObject (_moo_module, (char*) "canvas", submod);
submod = PyImport_ImportModule ("moo.canvas");
PyModule_AddObject (_moo_module, "canvas", submod);
#endif
#ifdef MOO_BUILD_APP
if (!_moo_app_mod_init ())
return FALSE;
submod = PyImport_ImportModule ((char*) "moo.app");
PyModule_AddObject (_moo_module, (char*) "app", submod);
submod = PyImport_ImportModule ("moo.app");
PyModule_AddObject (_moo_module, "app", submod);
#endif
code = Py_CompileString (MOO_PY, "moo/__init__.py", Py_file_input);
@ -137,7 +137,7 @@ _moo_pygtk_init (void)
if (!code)
return FALSE;
moo_mod = PyImport_ExecCodeModule ((char*) "moo", code);
moo_mod = PyImport_ExecCodeModule ("moo", code);
Py_DECREF (code);
if (!moo_mod)

View File

@ -19,7 +19,7 @@
#include "moopython/pygtk/mooapp-mod.h"
static char *moo_app_module_doc = (char*) "_moo_app module.";
static char *moo_app_module_doc = "_moo_app module.";
gboolean
@ -27,8 +27,8 @@ _moo_app_mod_init (void)
{
PyObject *mod;
mod = Py_InitModule3 ((char*) "_moo_app", _moo_app_functions, moo_app_module_doc);
PyImport_AddModule ((char*) "moo.app");
mod = Py_InitModule3 ("_moo_app", _moo_app_functions, moo_app_module_doc);
PyImport_AddModule ("moo.app");
if (!mod)
return FALSE;
@ -44,7 +44,7 @@ _moo_app_mod_init (void)
if (!code)
return FALSE;
fake_mod = PyImport_ExecCodeModule ((char*) "moo.app", code);
fake_mod = PyImport_ExecCodeModule ("moo.app", code);
Py_DECREF (code);
if (!fake_mod)

View File

@ -20,7 +20,7 @@
#include "mooedit/mooplugin.h"
static char *moo_edit_module_doc = (char*) "_moo_edit module.";
static char *moo_edit_module_doc = "_moo_edit module.";
gboolean
@ -28,8 +28,8 @@ _moo_edit_mod_init (void)
{
PyObject *mod;
mod = Py_InitModule3 ((char*) "_moo_edit", _moo_edit_functions, moo_edit_module_doc);
PyImport_AddModule ((char*) "moo.edit");
mod = Py_InitModule3 ("_moo_edit", _moo_edit_functions, moo_edit_module_doc);
PyImport_AddModule ("moo.edit");
if (!mod)
return FALSE;
@ -46,7 +46,7 @@ _moo_edit_mod_init (void)
if (!code)
return FALSE;
fake_mod = PyImport_ExecCodeModule ((char*) "moo.edit", code);
fake_mod = PyImport_ExecCodeModule ("moo.edit", code);
Py_DECREF (code);
if (!fake_mod)

View File

@ -34,7 +34,7 @@ _wrap_moo_python_plugin_register (G_GNUC_UNUSED PyObject *self, PyObject *args)
{
PyObject *plugin_type, *win_plugin_type = NULL, *doc_plugin_type = NULL;
if (!PyArg_ParseTuple (args, (char*) "O|OO:plugin_register", &plugin_type,
if (!PyArg_ParseTuple (args, "O|OO:plugin_register", &plugin_type,
&win_plugin_type, &doc_plugin_type))
return NULL;
@ -112,10 +112,10 @@ override moo_plugin_lookup_method kwargs
static PyObject *
_wrap_moo_plugin_lookup_method (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "name", NULL };
static char *kwlist[] = { "name", NULL };
char *name;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char*)"s:MooPlugin.lookup_method", kwlist, &name))
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:MooPlugin.lookup_method", kwlist, &name))
return NULL;
return PyBool_FromLong (moo_plugin_lookup_method (MOO_PLUGIN(self->obj), name) != 0);
@ -187,7 +187,7 @@ _wrap_moo_line_view_set_line_data (PyObject *self, PyObject *args)
MooLineView *view;
GValue data;
if (!PyArg_ParseTuple (args, (char*) "iO:LineView.set_line_data", &line, &py_data))
if (!PyArg_ParseTuple (args, "iO:LineView.set_line_data", &line, &py_data))
return NULL;
view = MOO_LINE_VIEW (pygobject_get (self));
@ -216,7 +216,7 @@ _wrap_moo_line_view_get_line_data (PyObject *self, PyObject *args)
GValue data;
PyObject *obj;
if (!PyArg_ParseTuple (args, (char*) "i:LineView.get_line_data", &line))
if (!PyArg_ParseTuple (args, "i:LineView.get_line_data", &line))
return NULL;
view = MOO_LINE_VIEW (pygobject_get (self));
@ -241,7 +241,7 @@ _wrap_moo_text_search_forward (G_GNUC_UNUSED PyObject *self, PyObject *args)
const GtkTextIter *start, *end = NULL;
GtkTextIter match_start, match_end;
if (!PyArg_ParseTuple(args, (char*) "OsO|O:search_forward", &py_start, &str, &py_flags, &py_end))
if (!PyArg_ParseTuple(args, "OsO|O:search_forward", &py_start, &str, &py_flags, &py_end))
return NULL;
if (pyg_boxed_check (py_start, GTK_TYPE_TEXT_ITER))
@ -280,7 +280,7 @@ _wrap_moo_text_search_backward (G_GNUC_UNUSED PyObject *self, PyObject *args)
const GtkTextIter *start, *end = NULL;
GtkTextIter match_start, match_end;
if (!PyArg_ParseTuple (args, (char*) "OsO|O:search_backward", &py_start, &str, &py_flags, &py_end))
if (!PyArg_ParseTuple (args, "OsO|O:search_backward", &py_start, &str, &py_flags, &py_end))
return NULL;
if (pyg_boxed_check (py_start, GTK_TYPE_TEXT_ITER))
@ -351,13 +351,13 @@ override moo_edit_class_remove_action kwargs
static PyObject *
_wrap_moo_edit_class_remove_action (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "class", (char*) "id", NULL};
static char *kwlist[] = {"class", "id", NULL};
PyObject *py_type;
GType type;
const char *action_id;
MooEditClass *klass;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Os:window_class_remove_action", kwlist, &py_type, &action_id))
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Os:window_class_remove_action", kwlist, &py_type, &action_id))
return NULL;
type = pyg_type_from_object (py_type);
@ -490,12 +490,12 @@ override moo_command_context_set kwargs
static PyObject *
_wrap_moo_command_context_set (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "name", (char*) "value", NULL};
static char *kwlist[] = {"name", "value", NULL};
char *name;
PyObject *py_value;
GValue value;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "sO:MooCommandContext.set", kwlist,
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "sO:MooCommandContext.set", kwlist,
&name, &py_value))
return NULL;
@ -515,12 +515,12 @@ override moo_command_context_get kwargs
static PyObject *
_wrap_moo_command_context_get (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "name", NULL};
static char *kwlist[] = {"name", NULL};
char *name;
PyObject *py_value;
GValue value;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "s:MooCommandContext.get",
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "s:MooCommandContext.get",
kwlist, &name))
return NULL;

View File

@ -1,17 +1,17 @@
/**/
/* -%- lang: C; indent-width: 4; use-tabs: no; strip: yes -%- */
%%
override moo_big_paned_find_pane kwargs
static PyObject *
_wrap_moo_big_paned_find_pane (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "pane_widget", NULL };
static char *kwlist[] = { "pane_widget", NULL };
PyGObject *widget;
MooPaned *child;
PyObject *ret;
MooPane *pane;
if (!PyArg_ParseTupleAndKeywords (args, kwargs,
(char*) "O!:MooBigPaned.find_pane", kwlist,
"O!:MooBigPaned.find_pane", kwlist,
&PyGtkWidget_Type, &widget))
return NULL;

View File

@ -20,7 +20,7 @@
#include "moopython/moopython-utils.h"
static char *moo_term_module_doc = (char*)"_moo_term module.";
static char *moo_term_module_doc = "_moo_term module.";
gboolean
@ -28,8 +28,8 @@ _moo_term_mod_init (void)
{
PyObject *mod;
mod = Py_InitModule3 ((char*) "_moo_term", _moo_term_functions, moo_term_module_doc);
PyImport_AddModule ((char*) "moo.term");
mod = Py_InitModule3 ("_moo_term", _moo_term_functions, moo_term_module_doc);
PyImport_AddModule ("moo.term");
if (!mod)
return FALSE;
@ -46,7 +46,7 @@ _moo_term_mod_init (void)
if (!code)
return FALSE;
fake_mod = PyImport_ExecCodeModule ((char*) "moo.term", code);
fake_mod = PyImport_ExecCodeModule ("moo.term", code);
Py_DECREF (code);
if (!fake_mod)

View File

@ -53,11 +53,11 @@ override moo_term_copy_clipboard kwargs
static PyObject *
_wrap_moo_term_copy_clipboard (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "selection", NULL };
static char *kwlist[] = { "selection", NULL };
PyObject *py_selection = NULL;
GdkAtom selection;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char*) "O:MooTerm.copy_clipboard", kwlist, &py_selection))
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:MooTerm.copy_clipboard", kwlist, &py_selection))
return NULL;
selection = atom_from_pyobject(py_selection);
if (PyErr_Occurred())
@ -70,11 +70,11 @@ override moo_term_paste_clipboard kwargs
static PyObject *
_wrap_moo_term_paste_clipboard(PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "selection", NULL };
static char *kwlist[] = { "selection", NULL };
PyObject *py_selection = NULL;
GdkAtom selection;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char*) "O:MooTerm.paste_clipboard", kwlist, &py_selection))
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:MooTerm.paste_clipboard", kwlist, &py_selection))
return NULL;
selection = atom_from_pyobject(py_selection);
if (PyErr_Occurred())
@ -90,7 +90,7 @@ _wrap_moo_term_get_iter_at_line (PyGObject *self, PyObject *args)
int line;
MooTermIter iter;
if (!PyArg_ParseTuple (args, (char*) "i:MooTerm.get_iter_at_line", &line))
if (!PyArg_ParseTuple (args, "i:MooTerm.get_iter_at_line", &line))
return NULL;
if (moo_term_get_iter_at_line (MOO_TERM(self->obj), &iter, line))
@ -106,7 +106,7 @@ _wrap_moo_term_get_iter_at_line_offset (PyGObject *self, PyObject *args)
int line, offset;
MooTermIter iter;
if (!PyArg_ParseTuple (args, (char*) "ii:MooTerm.get_iter_at_line_offset", &line, &offset))
if (!PyArg_ParseTuple (args, "ii:MooTerm.get_iter_at_line_offset", &line, &offset))
return NULL;
if (moo_term_get_iter_at_line_offset (MOO_TERM(self->obj), &iter, line, offset))
@ -132,7 +132,7 @@ _wrap_moo_term_get_iter_at_location (PyGObject *self, PyObject *args)
int x, y;
MooTermIter iter;
if (!PyArg_ParseTuple (args, (char*) "ii:MooTerm.get_iter_at_location", &x, &y))
if (!PyArg_ParseTuple (args, "ii:MooTerm.get_iter_at_location", &x, &y))
return NULL;
moo_term_get_iter_at_location (MOO_TERM(self->obj), &iter, x, y);
@ -146,7 +146,7 @@ _wrap_moo_term_get_iter_at_pos (PyGObject *self, PyObject *args)
int x, y;
MooTermIter iter;
if (!PyArg_ParseTuple (args, (char*) "ii:MooTerm.get_iter_at_pos", &x, &y))
if (!PyArg_ParseTuple (args, "ii:MooTerm.get_iter_at_pos", &x, &y))
return NULL;
moo_term_get_iter_at_pos (MOO_TERM(self->obj), &iter, x, y);
@ -171,11 +171,11 @@ _wrap_moo_term_window_to_buffer_coords (PyGObject *self, PyObject *args)
int x, y;
int buf_x, buf_y;
if (!PyArg_ParseTuple (args, (char*) "ii:MooTerm.window_to_buffer_coords", &x, &y))
if (!PyArg_ParseTuple (args, "ii:MooTerm.window_to_buffer_coords", &x, &y))
return NULL;
moo_term_window_to_buffer_coords (MOO_TERM(self->obj), x, y, &buf_x, &buf_y);
return Py_BuildValue((char*) "(ii)", buf_x, buf_y);
return Py_BuildValue("(ii)", buf_x, buf_y);
}
%%
override moo_term_feed varargs
@ -185,7 +185,7 @@ _wrap_moo_term_feed (PyGObject *self, PyObject *args)
char *string;
int len;
if (!PyArg_ParseTuple (args, (char*) "s#:MooTerm.feed", &string, &len))
if (!PyArg_ParseTuple (args, "s#:MooTerm.feed", &string, &len))
return NULL;
moo_term_feed (MOO_TERM (self->obj), string, len);
@ -199,7 +199,7 @@ _wrap_moo_term_feed_child (PyGObject *self, PyObject *args)
char *string;
int len;
if (!PyArg_ParseTuple (args, (char*) "s#:MooTerm.feed_child", &string, &len))
if (!PyArg_ParseTuple (args, "s#:MooTerm.feed_child", &string, &len))
return NULL;
moo_term_feed_child (MOO_TERM (self->obj), string, len);
@ -212,7 +212,7 @@ _wrap_moo_term_get_screen_size (PyGObject *self)
{
guint columns, rows;
moo_term_get_screen_size (MOO_TERM (self->obj), &columns, &rows);
return Py_BuildValue ((char*) "(ii)", columns, rows);
return Py_BuildValue ("(ii)", columns, rows);
}
%%
override moo_term_command_copy noargs
@ -234,7 +234,7 @@ _wrap_moo_term_set_colors (PyGObject *self, PyObject *args)
guint i, n_colors;
PyObject *py_colors;
if (!PyArg_ParseTuple (args, (char*) "O:MooTerm.set_colors", &py_colors))
if (!PyArg_ParseTuple (args, "O:MooTerm.set_colors", &py_colors))
return NULL;
if (!PySequence_Check (py_colors))
@ -365,10 +365,10 @@ override moo_term_command_new kwargs
static int
_wrap_moo_term_command_new (PyGBoxed *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "cmd_line", (char*) "argv", (char*) "working_dir", (char*) "envp", NULL };
static char *kwlist[] = { "cmd_line", "argv", "working_dir", "envp", NULL };
char *cmd_line = NULL, **argv = NULL, *working_dir = NULL, **envp = NULL;
if (!PyArg_ParseTupleAndKeywords (args, kwargs,(char*) "|zO&zO&:MooTermCommand.__init__",
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "|zO&zO&:MooTermCommand.__init__",
kwlist,
&cmd_line,
_moo_pyobject_to_strv, &argv,

View File

@ -24,9 +24,9 @@
#include "mooutils/moostock.h"
static char *moo_utils_module_doc = (char*)"__moo_utils__ module.";
static char *moo_utils_module_doc = "__moo_utils__ module.";
#define add_constant(mod_,name_,val_) PyModule_AddStringConstant (mod, (char*) name_, (char*) val_)
#define add_constant(mod_,name_,val_) PyModule_AddStringConstant (mod, name_, val_)
static PyObject *
@ -55,8 +55,8 @@ _moo_utils_mod_init (void)
pyg_register_boxed_custom (MOO_TYPE_PY_OBJECT, pyobj_from_gval, gval_from_pyobj);
mod = Py_InitModule3 ((char*) "__moo_utils__", _moo_utils_functions, moo_utils_module_doc);
PyImport_AddModule ((char*) "moo.utils");
mod = Py_InitModule3 ("__moo_utils__", _moo_utils_functions, moo_utils_module_doc);
PyImport_AddModule ("moo.utils");
if (!mod)
return FALSE;
@ -105,7 +105,7 @@ _moo_utils_mod_init (void)
if (!code)
return FALSE;
fake_mod = PyImport_ExecCodeModule ((char*) "moo.utils", code);
fake_mod = PyImport_ExecCodeModule ("moo.utils", code);
Py_DECREF (code);
if (!fake_mod)

View File

@ -160,14 +160,14 @@ override moo_window_class_find_action kwargs
static PyObject *
_wrap_moo_window_class_find_action (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "cls", (char*) "name", NULL};
static char *kwlist[] = {"cls", "name", NULL};
PyObject *py_type;
GType type;
const char *action_id;
MooWindowClass *klass;
gboolean ret;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Os:window_class_find_action", kwlist, &py_type, &action_id))
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Os:window_class_find_action", kwlist, &py_type, &action_id))
return NULL;
type = pyg_type_from_object (py_type);
@ -189,13 +189,13 @@ override moo_window_class_remove_action kwargs
static PyObject *
_wrap_moo_window_class_remove_action (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "cls", (char*) "name", NULL};
static char *kwlist[] = {"cls", "name", NULL};
PyObject *py_type;
GType type;
const char *action_id;
MooWindowClass *klass;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Os:window_class_remove_action", kwlist, &py_type, &action_id))
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Os:window_class_remove_action", kwlist, &py_type, &action_id))
return NULL;
type = pyg_type_from_object (py_type);
@ -217,13 +217,13 @@ override moo_window_class_new_group kwargs
static PyObject *
_wrap_moo_window_class_new_group (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "cls", (char*) "name", (char*) "display_name", NULL};
static char *kwlist[] = {"cls", "name", "display_name", NULL};
PyObject *py_type;
GType type;
const char *name, *display_name;
MooWindowClass *klass;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Oss:window_class_new_group", kwlist,
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Oss:window_class_new_group", kwlist,
&py_type, &name, &display_name))
return NULL;
@ -246,14 +246,14 @@ override moo_window_class_find_group kwargs
static PyObject *
_wrap_moo_window_class_find_group (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "cls", (char*) "name", NULL};
static char *kwlist[] = {"cls", "name", NULL};
PyObject *py_type;
GType type;
const char *name;
MooWindowClass *klass;
gboolean ret;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Os:window_class_find_group", kwlist,
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Os:window_class_find_group", kwlist,
&py_type, &name))
return NULL;
@ -276,13 +276,13 @@ override moo_window_class_remove_group kwargs
static PyObject *
_wrap_moo_window_class_remove_group (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = {(char*) "cls", (char*) "name", NULL};
static char *kwlist[] = {"cls", "name", NULL};
PyObject *py_type;
GType type;
const char *name;
MooWindowClass *klass;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "Os:window_class_remove_group", kwlist,
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "Os:window_class_remove_group", kwlist,
&py_type, &name))
return NULL;
@ -510,7 +510,7 @@ _wrap_moo_prefs_new_key (G_GNUC_UNUSED PyObject *self, PyObject *args)
int prefs_type;
PyObject *py_prefs_type, *py_default, *py_type;
if (!PyArg_ParseTuple (args, (char*) "sOOO:prefs_new_key", &key,
if (!PyArg_ParseTuple (args, "sOOO:prefs_new_key", &key,
&py_type, &py_default, &py_prefs_type))
return NULL;
if (pyg_enum_get_value (MOO_TYPE_DATA_DIR_TYPE, py_prefs_type, &prefs_type) != 0)
@ -572,7 +572,7 @@ _wrap_moo_get_data_dirs (G_GNUC_UNUSED PyObject *self, PyObject *args)
char **dirs;
guint n_dirs, i;
if (!PyArg_ParseTuple (args, (char*) "O:get_data_dirs", &py_type))
if (!PyArg_ParseTuple (args, "O:get_data_dirs", &py_type))
return NULL;
if (pyg_enum_get_value(MOO_TYPE_DATA_DIR_TYPE, py_type, &type))
return NULL;
@ -603,7 +603,7 @@ _wrap_moo_get_data_subdirs (G_GNUC_UNUSED PyObject *self, PyObject *args)
guint n_dirs, i;
char *subdir;
if (!PyArg_ParseTuple (args, (char*) "sO:get_data_dirs", &subdir, &py_type))
if (!PyArg_ParseTuple (args, "sO:get_data_dirs", &subdir, &py_type))
return NULL;
if (pyg_enum_get_value(MOO_TYPE_DATA_DIR_TYPE, py_type, &type))
return NULL;
@ -627,12 +627,12 @@ override moo_file_watch_monitor_directory kwargs
static PyObject *
_wrap_moo_file_watch_monitor_directory (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "filename", NULL };
static char *kwlist[] = { "filename", NULL };
char *filename;
int ret;
GError *error = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,(char*) "s:MooFileWatch.monitor_directory", kwlist, &filename))
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:MooFileWatch.monitor_directory", kwlist, &filename))
return NULL;
ret = moo_file_watch_monitor_directory (MOO_FILE_WATCH(self->obj), filename, NULL, &error);
@ -647,12 +647,12 @@ override moo_file_watch_monitor_file kwargs
static PyObject *
_wrap_moo_file_watch_monitor_file (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "filename", NULL };
static char *kwlist[] = { "filename", NULL };
char *filename;
int ret;
GError *error = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,(char*) "s:MooFileWatch.monitor_file", kwlist, &filename))
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "s:MooFileWatch.monitor_file", kwlist, &filename))
return NULL;
ret = moo_file_watch_monitor_file (MOO_FILE_WATCH (self->obj), filename, NULL, &error);
@ -667,14 +667,14 @@ override moo_glade_xml_fill_widget kwargs
static PyObject *
_wrap_moo_glade_xml_fill_widget (PyGObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "target", (char*) "buffer", (char*) "target_name", NULL };
static char *kwlist[] = { "target", "buffer", "target_name", NULL };
PyGObject *target;
char *buffer, *target_name;
GError *error = NULL;
int ret;
if (!PyArg_ParseTupleAndKeywords(args, kwargs,
(char*) "O!ss:MooGladeXML.fill_widget", kwlist,
"O!ss:MooGladeXML.fill_widget", kwlist,
&PyGtkWidget_Type, &target,
&buffer, &target_name))
return NULL;
@ -695,7 +695,7 @@ override moo_file_dialog kwargs
static PyObject *
_wrap_moo_file_dialog (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "type", (char*) "parent", (char*) "title", (char*) "start_dir", NULL };
static char *kwlist[] = { "type", "parent", "title", "start_dir", NULL };
PyObject *py_type = NULL;
int type;
char *title = NULL, *start_dir = NULL;
@ -703,7 +703,7 @@ _wrap_moo_file_dialog (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *k
GtkWidget *parent = NULL;
PyGObject *py_parent = NULL;
if (!PyArg_ParseTupleAndKeywords(args, kwargs, (char*) "O|Ozz:file_dialog", kwlist,
if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O|Ozz:file_dialog", kwlist,
&py_type, &py_parent, &title, &start_dir))
return NULL;
@ -736,12 +736,12 @@ override moo_bind_sensitive kwargs
static PyObject *
_wrap_moo_bind_sensitive (G_GNUC_UNUSED PyObject *self, PyObject *args, PyObject *kwargs)
{
static char *kwlist[] = { (char*) "toggle_btn", (char*) "dependent", (char*) "invert", NULL };
static char *kwlist[] = { "toggle_btn", "dependent", "invert", NULL };
PyGObject *toggle_btn, *dependent;
int invert = FALSE;
GtkWidget *widget;
if (!PyArg_ParseTupleAndKeywords (args, kwargs, (char*) "O!O!|i:moo_bind_sensitive", kwlist,
if (!PyArg_ParseTupleAndKeywords (args, kwargs, "O!O!|i:moo_bind_sensitive", kwlist,
&PyGtkWidget_Type, &toggle_btn,
&PyGtkWidget_Type, &dependent,
&invert))