Mercurial > pytave
diff __py_struct_from_dict__.cc @ 409:b9b8790d1082
Add overload of py_isinstance taking a string decribing a type
* oct-py-util.h (pytave::py_isinstance): New function overload.
* __py_struct_from_dict__.cc (F__py_isinstance__): Use it.
* python_to_octave.cc (pytave::pyobj_to_octvalue): Use it.
author | Mike Miller <mtmiller@octave.org> |
---|---|
date | Tue, 02 May 2017 17:44:02 -0700 |
parents | f833e29b2c12 |
children | 3613ffbd52b2 |
line wrap: on
line diff
--- a/__py_struct_from_dict__.cc Tue May 02 10:06:14 2017 -0700 +++ b/__py_struct_from_dict__.cc Tue May 02 17:44:02 2017 -0700 @@ -238,8 +238,7 @@ pytave::py_init (); pytave::python_object obj = pytave::pyobject_unwrap_object (args(0)); - pytave::python_object type = pytave::py_find_type (typestr); - retval(0) = pytave::py_isinstance (obj, type); + retval(0) = pytave::py_isinstance (obj, typestr); return retval; }