[glom/glom-1-26] Add comments about python Gda versioning.



commit 92d2a7de000230e644cf7cca4fa4b207e0b073ed
Author: Murray Cumming <murrayc murrayc com>
Date:   Fri Apr 25 13:46:26 2014 +0200

    Add comments about python Gda versioning.

 glom/python_embed/glom_python.cc   |    6 ++++++
 tests/python/test_python_module.cc |    3 +++
 2 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index 42ca8ec..5d5ef75 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -162,6 +162,8 @@ bool gir_python_module_is_available()
 
 bool gda_python_module_is_available()
 {
+  //TODO: How can we requests a specific version to avoid confusion
+  //between the parallel-installed Gda-5.0 and Gda-6.0 APIs?
   const char* name = "gi.repository.Gda";
   const boost::python::object module_glom = import_module(name);
   return module_glom != boost::python::object();
@@ -205,6 +207,8 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   else
     func_signature = func_name + "(record, ui)";
 
+  //TODO: How can we requests a specific version to avoid confusion
+  //between the parallel-installed Gda-5.0 and Gda-6.0 APIs?
   func_def = "def " + func_signature + ":\n  import glom_" GLOM_ABI_VERSION_UNDERLINED "\n  from 
gi.repository import Gda\n" + func_def;
 
   //We did this in main(): Py_Initialize();
@@ -257,6 +261,8 @@ static boost::python::object glom_python_call(Field::glom_field_type result_type
   }
 
   //TODO: Is this necessary?
+  //TODO: How can we requests a specific version to avoid confusion
+  //between the parallel-installed Gda-5.0 and Gda-6.0 APIs?
   boost::python::object module_gda = import_module("gi.repository.Gda");
   if(module_gda == boost::python::object())
   {
diff --git a/tests/python/test_python_module.cc b/tests/python/test_python_module.cc
index 7162c7a..fe0ab88 100644
--- a/tests/python/test_python_module.cc
+++ b/tests/python/test_python_module.cc
@@ -28,6 +28,9 @@ bool glom_python_module_is_available()
 
 bool gda_python_module_is_available()
 {
+  //TODO: How can we requests a specific version to avoid confusion
+  //between the parallel-installed Gda-5.0 and Gda-6.0 APIs?
+
   //Python code usually uses "from gi.repository import Gda" so that 
   //the code may use Gda. rather than gi.repository.Gda in the code.
   const gchar* name = "gi.repository.Gda"; 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]