comparison __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
comparison
equal deleted inserted replaced
408:f833e29b2c12 409:b9b8790d1082
236 typestr = typestr.substr (3); 236 typestr = typestr.substr (3);
237 237
238 pytave::py_init (); 238 pytave::py_init ();
239 239
240 pytave::python_object obj = pytave::pyobject_unwrap_object (args(0)); 240 pytave::python_object obj = pytave::pyobject_unwrap_object (args(0));
241 pytave::python_object type = pytave::py_find_type (typestr); 241 retval(0) = pytave::py_isinstance (obj, typestr);
242 retval(0) = pytave::py_isinstance (obj, type);
243 242
244 return retval; 243 return retval;
245 } 244 }
246 245
247 DEFUN_DLD (__py_objstore_del__, args, nargout, 246 DEFUN_DLD (__py_objstore_del__, args, nargout,