[glom/boostpythonretry] More weird correctness
- From: Murray Cumming <murrayc src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [glom/boostpythonretry] More weird correctness
- Date: Sun, 7 Feb 2010 10:53:06 +0000 (UTC)
commit ce351685860c36f47d2728ef138c6cd4b3829808
Author: Murray Cumming <murrayc murrayc com>
Date: Sun Feb 7 11:34:44 2010 +0100
More weird correctness
glom/python_embed/glom_python.cc | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/glom/python_embed/glom_python.cc b/glom/python_embed/glom_python.cc
index f9d3dbb..1ec63fc 100644
--- a/glom/python_embed/glom_python.cc
+++ b/glom/python_embed/glom_python.cc
@@ -199,7 +199,9 @@ Gnome::Gda::Value glom_evaluate_python_function_implementation(Field::glom_field
//We did this in main(): Py_Initialize();
boost::python::object pMain = boost::python::import("__main__");
- boost::python::dict pDict = boost::python::extract<boost::python::dict>( pMain.attr("__dict__") ); //TODO: Does boost::python have an equivalent for PyModule_GetDict()?
+ boost::python::dict pDict(pMain.attr("__dict__")); //TODO: Does boost::python have an equivalent for PyModule_GetDict()?
+ //TODO: Complain that this doesn't work:
+ //boost::python::dict pDict = pMain.attr("__dict__"); //TODO: Does boost::python have an equivalent for PyModule_GetDict()?
if(!pDict)
{
std::cerr << "glom_evaluate_python_function_implementation(): pDict is null" << std::endl;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]