Update of /cvsroot/boost/boost/libs/python/test
In directory sc8-pr-cvs3.sourceforge.net:/tmp/cvs-serv2983/libs/python/test
Modified Files:
Tag: RC_1_34_0
exec.cpp
Log Message:
Backport new eval() function from HEAD.
Index: exec.cpp
===================================================================
RCS file: /cvsroot/boost/boost/libs/python/test/exec.cpp,v
retrieving revision 1.5.2.1
retrieving revision 1.5.2.2
diff -u -d -r1.5.2.1 -r1.5.2.2
--- exec.cpp 24 Jul 2006 22:28:25 -0000 1.5.2.1
+++ exec.cpp 15 May 2007 13:43:52 -0000 1.5.2.2
@@ -49,6 +49,13 @@
}
+void eval_test()
+{
+ python::object result = python::eval("'abcdefg'.upper()");
+ std::string value = python::extract<std::string>(result)
BOOST_EXTRACT_WORKAROUND;
+ BOOST_TEST(value == "ABCDEFG");
+}
+
void exec_test()
{
// Register the module with the interpreter
@@ -108,7 +115,8 @@
// Initialize the interpreter
Py_Initialize();
- if (python::handle_exception(exec_test) ||
+ if (python::handle_exception(eval_test) ||
+ python::handle_exception(exec_test) ||
python::handle_exception(boost::bind(exec_file_test, script)))
{
if (PyErr_Occurred())
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Boost-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/boost-cvs