[glom] glom_pygda_value_from_pyobject(): Handle Py_None explicitly.
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] glom_pygda_value_from_pyobject(): Handle Py_None explicitly.
- Date: Thu, 5 Nov 2015 22:22:12 +0000 (UTC)
commit a53a07f6c5fe7e14ca7931ceeaf127f78f7bf8e6
Author: Murray Cumming <murrayc murrayc com>
Date: Tue Nov 3 22:32:20 2015 +0100
glom_pygda_value_from_pyobject(): Handle Py_None explicitly.
.../libglom/python_embed/pygdavalue_conversions.cc | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/glom/libglom/python_embed/pygdavalue_conversions.cc
b/glom/libglom/python_embed/pygdavalue_conversions.cc
index af7394b..78f9f6d 100644
--- a/glom/libglom/python_embed/pygdavalue_conversions.cc
+++ b/glom/libglom/python_embed/pygdavalue_conversions.cc
@@ -44,6 +44,12 @@ glom_pygda_value_from_pyobject(GValue* boxed, const boost::python::object& input
g_value_unset(boxed);
auto input_c = input.ptr();
+
+ if(input_c == Py_None)
+ {
+ std::cerr << G_STRFUNC << ": Returning false for Py_None" << std::endl;
+ return false;
+ }
//We check for bool first,
//because bool is derived from int in Python,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]