diff python_to_octave.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 09a1acb81d8b
children b9b8790d1082
line wrap: on
line diff
--- a/python_to_octave.cc	Sat Apr 29 15:43:42 2017 -0700
+++ b/python_to_octave.cc	Mon May 01 08:41:01 2017 -0700
@@ -44,8 +44,6 @@
 #include "oct-py-util.h"
 #include "python_to_octave.h"
 
-using namespace boost::python;
-
 namespace pytave
 {
   template <class PythonPrimitive, class OctaveBase>
@@ -295,7 +293,7 @@
               // Create a new view of the NumPy array.
               PyArrayObject *view = (PyArrayObject *)PyArray_View (pyarr, view_descr, 0);
               // Store in a handle to ensure proper destruction.
-              handle<PyObject> view_handle (allow_null ((PyObject *)view));
+              boost::python::handle<> view_handle (boost::python::allow_null ((PyObject *)view));
               // Call recursively.
               pyarr_to_octvalue (octvalue, view);
             }
@@ -313,7 +311,7 @@
   void pyobj_to_octvalue (octave_value& oct_value,
                           const boost::python::object& py_object)
   {
-    extract<numeric::array> arrayx (py_object);
+    boost::python::extract<boost::python::numeric::array> arrayx (py_object);
 
     if (PyBool_Check (py_object.ptr ()))
       oct_value = extract_py_bool (py_object.ptr ());