[glom/online-glom] Remove python code in libglom to avoid python errors when using the generated Java bindings.
- From: Benjamin Konrath <bkonrath src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom/online-glom] Remove python code in libglom to avoid python errors when using the generated Java bindings.
- Date: Fri, 17 Dec 2010 08:23:36 +0000 (UTC)
commit 56736c821880acbaed7415ed8f5fda714d8ecfc9
Author: Ben Konrath <ben bagu org>
Date: Fri Dec 17 09:15:50 2010 +0100
Remove python code in libglom to avoid python errors when using the
generated Java bindings.
* glom/libglom/init.cc: Remove python code in init and deinit.
ChangeLog | 7 +++++++
glom/libglom/init.cc | 19 -------------------
2 files changed, 7 insertions(+), 19 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 67c5126..52c6ba9 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-17 Ben Konrath <ben bagu org>
+
+ Remove python code in libglom to avoid python errors when using the
+ generated Java bindings.
+
+ * glom/libglom/init.cc: Remove python code in init and deinit.
+
2010-12-15 Ben Konrath <ben bagu org>
Add Eclipse 3.6 / CDT 7.0 configuration files.
diff --git a/glom/libglom/init.cc b/glom/libglom/init.cc
index 97a813e..e9aeb6d 100644
--- a/glom/libglom/init.cc
+++ b/glom/libglom/init.cc
@@ -18,23 +18,10 @@
* Boston, MA 02111-1307, USA.
*/
-#include <Python.h> //Include it before anything else to avoid "_POSIX_C_SOURCE redefined".
-#if PY_VERSION_HEX >= 0x02040000
-# include <datetime.h> /* From Python */
-#endif
-
#include <glom/libglom/connectionpool.h>
#include <giomm.h>
#include <libgdamm.h>
-
-//TODO: Remove this redefine when Python fixes the compiler error in their macro:
-// http://bugs.python.org/issue7463
-#undef PyDateTime_IMPORT
-#define PyDateTime_IMPORT \
- PyDateTimeAPI = (PyDateTime_CAPI*) PyCObject_Import((char*)"datetime", \
- (char*)"datetime_CAPI")
-
namespace Glom
{
@@ -46,16 +33,10 @@ void libglom_init()
Gnome::Gda::init();
Gio::init();
- Py_Initialize();
- PyDateTime_IMPORT; //A macro, needed to use PyDate_Check(), PyDateTime_Check(), etc.
- g_assert(PyDateTimeAPI); //This should have been set by the PyDateTime_IMPORT macro.
}
void libglom_deinit()
{
- //We use python for calculated-fields:
- Py_Finalize();
-
//Clean up singletons:
Glom::ConnectionPool::delete_instance();
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]