[libchamplain/libchamplain-0-4] python-binding: changes in coding style and new constants
- From: Pierre-Luc Beaudoin <plbeaudoin src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [libchamplain/libchamplain-0-4] python-binding: changes in coding style and new constants
- Date: Sat, 9 Jan 2010 19:58:31 +0000 (UTC)
commit ff0bec8039a003ea96f00568c5a641fb09f52223
Author: Victor Godoy Poluceno <victorpoluceno gmail com>
Date: Thu Dec 3 16:00:29 2009 -0200
python-binding: changes in coding style and new constants
bindings/python/champlain/pychamplainmodule.c | 62 +++++++++++++------------
1 files changed, 33 insertions(+), 29 deletions(-)
---
diff --git a/bindings/python/champlain/pychamplainmodule.c b/bindings/python/champlain/pychamplainmodule.c
index 71fb3d9..264e3a0 100644
--- a/bindings/python/champlain/pychamplainmodule.c
+++ b/bindings/python/champlain/pychamplainmodule.c
@@ -10,33 +10,37 @@ extern PyMethodDef champlain_functions[];
DL_EXPORT(void)
initchamplain (void)
{
- PyObject *m, *d;
-
- init_pygobject ();
-
- m = Py_InitModule ("champlain", champlain_functions);
- d = PyModule_GetDict (m);
-
- champlain_register_classes (d);
- champlain_add_constants(m, "CHAMPLAIN_");
-
- /* constants */
- PyModule_AddObject(m, "MAP_SOURCE_OSM_MAPNIK", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK));
- PyModule_AddObject(m, "MAP_SOURCE_OSM_OSMARENDER", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER));
- PyModule_AddObject(m, "MAP_SOURCE_OSM_CYCLE_MAP", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP));
- PyModule_AddObject(m, "MAP_SOURCE_OSM_TRANSPORT_MAP", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP));
- PyModule_AddObject(m, "MAP_SOURCE_OAM", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_OAM));
- PyModule_AddObject(m, "MAP_SOURCE_MFF_RELIEF", Py_BuildValue("s",
- CHAMPLAIN_MAP_SOURCE_MFF_RELIEF));
-
- if (PyErr_Occurred ()) {
- PyErr_Print();
- Py_FatalError ("can't initialise module champlain");
- }
-}
+ PyObject *m, *d;
+
+ init_pygobject ();
+
+ m = Py_InitModule ("champlain", champlain_functions);
+ d = PyModule_GetDict (m);
+
+ champlain_register_classes (d);
+ champlain_add_constants(m, "CHAMPLAIN_");
+ /* constants */
+ PyModule_AddObject(m, "MAP_SOURCE_OSM_MAPNIK", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_OSM_MAPNIK));
+ PyModule_AddObject(m, "MAP_SOURCE_OSM_OSMARENDER", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_OSM_OSMARENDER));
+ PyModule_AddObject(m, "MAP_SOURCE_OSM_CYCLE_MAP", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_OSM_CYCLE_MAP));
+ PyModule_AddObject(m, "MAP_SOURCE_OSM_TRANSPORT_MAP", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_OSM_TRANSPORT_MAP));
+ PyModule_AddObject(m, "MAP_SOURCE_OAM", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_OAM));
+ PyModule_AddObject(m, "MAP_SOURCE_MFF_RELIEF", Py_BuildValue("s",
+ CHAMPLAIN_MAP_SOURCE_MFF_RELIEF));
+
+ PyModule_AddObject(m, "MIN_LAT", Py_BuildValue("i", CHAMPLAIN_MIN_LAT));
+ PyModule_AddObject(m, "MAX_LAT", Py_BuildValue("i", CHAMPLAIN_MAX_LAT));
+ PyModule_AddObject(m, "MIN_LONG", Py_BuildValue("i", CHAMPLAIN_MIN_LONG));
+ PyModule_AddObject(m, "MAX_LONG", Py_BuildValue("i", CHAMPLAIN_MAX_LONG));
+
+ if (PyErr_Occurred ()) {
+ PyErr_Print();
+ Py_FatalError ("can't initialise module champlain");
+ }
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]