Mercurial > pytave
comparison __py_struct_from_dict__.cc @ 415:9bf8ba050122
Replace all remaining Boost.Python references
* exceptions.h (pytave::error_alreadY_set): New exception placeholder class.
* __py_struct_from_dict__.cc, oct-py-eval.cc, oct-py-types.cc, oct-py-util.cc,
pycall.cc, pyeval.cc, pyexec.cc: Use it in place of boost::python. Remove all
#includes of Boost headers.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Wed, 03 May 2017 21:48:07 -0700 |
parents | 3613ffbd52b2 |
children | 7864849e84c2 |
comparison
equal
deleted
inserted
replaced
414:ee6afd27a78c | 415:9bf8ba050122 |
---|---|
30 #include "exceptions.h" | 30 #include "exceptions.h" |
31 #include "oct-py-init.h" | 31 #include "oct-py-init.h" |
32 #include "oct-py-object.h" | 32 #include "oct-py-object.h" |
33 #include "oct-py-types.h" | 33 #include "oct-py-types.h" |
34 #include "oct-py-util.h" | 34 #include "oct-py-util.h" |
35 | |
36 // FIXME: only here for exception types still used in this file | |
37 #include <boost/python/errors.hpp> | |
38 | 35 |
39 DEFUN_DLD (__py_class_name__, args, , | 36 DEFUN_DLD (__py_class_name__, args, , |
40 "-*- texinfo -*-\n\ | 37 "-*- texinfo -*-\n\ |
41 @deftypefn {} {} __py_class_name__ (@var{obj})\n\ | 38 @deftypefn {} {} __py_class_name__ (@var{obj})\n\ |
42 Return the name of the class of the Python object @var{obj}.\n\ | 39 Return the name of the class of the Python object @var{obj}.\n\ |
102 } | 99 } |
103 catch (pytave::object_convert_exception const &) | 100 catch (pytave::object_convert_exception const &) |
104 { | 101 { |
105 error ("pyobject.int64: argument must be a Python int or long object"); | 102 error ("pyobject.int64: argument must be a Python int or long object"); |
106 } | 103 } |
107 catch (boost::python::error_already_set const &) | 104 catch (pytave::error_already_set const &) |
108 { | 105 { |
109 std::string message = pytave::fetch_exception_message (); | 106 std::string message = pytave::fetch_exception_message (); |
110 error ("pyobject.int64: %s", message.c_str ()); | 107 error ("pyobject.int64: %s", message.c_str ()); |
111 } | 108 } |
112 | 109 |
154 } | 151 } |
155 catch (pytave::object_convert_exception const &) | 152 catch (pytave::object_convert_exception const &) |
156 { | 153 { |
157 error ("pyobject.uint64: argument must be a Python int or long object"); | 154 error ("pyobject.uint64: argument must be a Python int or long object"); |
158 } | 155 } |
159 catch (boost::python::error_already_set const &) | 156 catch (pytave::error_already_set const &) |
160 { | 157 { |
161 std::string message = pytave::fetch_exception_message (); | 158 std::string message = pytave::fetch_exception_message (); |
162 error ("pyobject.uint64: %s", message.c_str ()); | 159 error ("pyobject.uint64: %s", message.c_str ()); |
163 } | 160 } |
164 | 161 |