[glom] glom_pygda_value_as_boost_pyobject(): Handle GDA_TYPE_NULL explicitly.



commit 1e28d83d8adbdaa340e9f1a73439f62cb397d4be
Author: Murray Cumming <murrayc murrayc com>
Date:   Tue Nov 3 23:02:45 2015 +0100

    glom_pygda_value_as_boost_pyobject(): Handle GDA_TYPE_NULL explicitly.

 .../libglom/python_embed/pygdavalue_conversions.cc |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc 
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index b6f5079..c3bad2e 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -275,6 +275,9 @@ boost::python::object glom_pygda_value_as_boost_pyobject(const Glib::ValueBase&
         ret = boost::python::object(gda_value_get_ushort(boxed));
     } else if(value_type == G_TYPE_UINT) {
         ret = boost::python::object(g_value_get_uint(boxed));
+    } else if(value_type == GDA_TYPE_NULL) {
+        std::cerr << G_STRFUNC << ": Returning Py_None for GDA_TYPE_NULL." << std::endl;
+        ret = boost::python::object();
     } else {
       std::cerr << G_STRFUNC << ": Glom: G_VALUE_TYPE() returned unknown type: " << value_type << std::endl;
       std::cerr << G_STRFUNC << "  type name: " << g_type_name(value_type) << std::endl;


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