r4664 - in trunk/src/host/pye17: codegen evas
marek at docs.openmoko.org
marek at docs.openmoko.org
Wed Sep 24 07:21:16 CEST 2008
Author: marek
Date: 2008-09-24 07:21:13 +0200 (Wed, 24 Sep 2008)
New Revision: 4664
Modified:
trunk/src/host/pye17/codegen/codegen.py
trunk/src/host/pye17/codegen/h2def.py
trunk/src/host/pye17/evas/evasmodule.c
Log:
make the evas binding compile and run without crash on import
known issues:
the functions needs testing
Modified: trunk/src/host/pye17/codegen/codegen.py
===================================================================
--- trunk/src/host/pye17/codegen/codegen.py 2008-09-22 22:57:34 UTC (rev 4663)
+++ trunk/src/host/pye17/codegen/codegen.py 2008-09-24 05:21:13 UTC (rev 4664)
@@ -1620,7 +1620,7 @@
self.fp.write(
'%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n'
- % dict(indent=indent_str, c_name=obj.c_name, typecode=77, bases=bases_str))
+ % dict(indent=indent_str, c_name=obj.c_name, typecode="G_TYPE_OBJECT", bases=bases_str))
#'%(indent)spygobject_register_class(d, "%(c_name)s", %(typecode)s, &Py%(c_name)s_Type, %(bases)s);\n'
#% dict(indent=indent_str, c_name=obj.c_name, typecode=obj.typecode, bases=bases_str))
Modified: trunk/src/host/pye17/codegen/h2def.py
===================================================================
--- trunk/src/host/pye17/codegen/h2def.py 2008-09-22 22:57:34 UTC (rev 4663)
+++ trunk/src/host/pye17/codegen/h2def.py 2008-09-24 05:21:13 UTC (rev 4664)
@@ -377,7 +377,7 @@
if module:
fp.write(' (in-module "' + module + '")\n')
fp.write(' (c-name "' + cname + '")\n')
- fp.write(' (gtype-id "77")\n')
+ fp.write(' (gtype-id "G_TYPE_OBJECT")\n')
#fp.write(' (gtype-id "' + typecode(cname) + '")\n')
prefix = entries[0]
for ent in entries:
Modified: trunk/src/host/pye17/evas/evasmodule.c
===================================================================
--- trunk/src/host/pye17/evas/evasmodule.c 2008-09-22 22:57:34 UTC (rev 4663)
+++ trunk/src/host/pye17/evas/evasmodule.c 2008-09-24 05:21:13 UTC (rev 4664)
@@ -1,22 +1,22 @@
#include <pygobject.h>
-
-void evas_register_classes (PyObject *d);
+
+void evas_register_classes(PyObject *d);
extern PyMethodDef evas_functions[];
-
+
DL_EXPORT(void)
initevas(void)
{
PyObject *m, *d;
-
- init_pygobject ();
-
- m = Py_InitModule ("evas", evas_functions);
- d = PyModule_GetDict (m);
-
- evas_register_classes (d);
-
- if (PyErr_Occurred ()) {
+
+ init_pygobject();
+
+ m = Py_InitModule("evas", evas_functions);
+
+ d = PyModule_GetDict(m);
+
+ evas_register_classes(d);
+
+ if (PyErr_Occurred()) {
Py_FatalError ("can't initialise module evas");
}
}
-
\ No newline at end of file
More information about the commitlog
mailing list