Mercurial > pytave
diff pycall.cc @ 406:16e79a1e96b8
Eliminate all remaining uses of "using namespace"
* octave_to_python.cc, pycall.cc, pyeval.cc, pyexec.cc, python_to_octave.cc:
Eliminate all remaining uses of "using namespace", use fully qualified class
and function names from Boost.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Mon, 01 May 2017 08:41:01 -0700 |
parents | 478d83448b0b |
children | 95c6ad0be828 |
line wrap: on
line diff
--- a/pycall.cc Sat Apr 29 15:43:42 2017 -0700 +++ b/pycall.cc Mon May 01 08:41:01 2017 -0700 @@ -38,8 +38,6 @@ #include "octave_to_python.h" #include "python_to_octave.h" -using namespace boost::python; - DEFUN_DLD (pycall, args, nargout, "-*- texinfo -*-\n\ @deftypefn {} {} pycall (@var{func})\n\ @@ -114,7 +112,7 @@ octave_value_list arglist = args.slice (1, nargin - 1); PyObject *result = pytave::py_call_function (callable, arglist); - object res = object (handle<PyObject> (result)); + boost::python::object res { boost::python::handle<> (result) }; // Ensure reasonable "ans" behaviour, consistent with Python's "_". if (nargout > 0 || ! res.is_none ()) @@ -132,7 +130,7 @@ { error ("pycall: error in argument type conversion"); } - catch (error_already_set const &) + catch (boost::python::error_already_set const &) { std::string message = pytave::fetch_exception_message (); error ("pycall: %s", message.c_str ());