changeset 194:d2385636bae5

Merge in Abhinav's changes
author Mike Miller <mtmiller@octave.org>
date Thu, 14 Jul 2016 23:23:34 -0700
parents 9077907490d8 (current diff) 28173dc00d51 (diff)
children 459b6f5c56ed
files pycall.cc
diffstat 1 files changed, 8 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/pycall.cc	Thu Jul 14 23:05:56 2016 -0700
+++ b/pycall.cc	Thu Jul 14 23:23:34 2016 -0700
@@ -176,6 +176,10 @@
     {
       error ("pycall: error in return value type conversion");
     }
+  catch (pytave::value_convert_exception const &)
+    {
+      error ("pycall: error in parameter type conversion");
+    }
   catch (error_already_set const &)
     {
       PyObject *ptype, *pvalue, *ptraceback;
@@ -217,6 +221,10 @@
 %!assert (pycall ("typename", "Hello world"), "str")
 %!assert (pycall ("typename", char ([1, 2, 3])), "str")
 
+%!error <parameter type conversion>
+%! pyexec ("def intwrapper(x):\n    return int(x)\n");
+%! pycall ("intwrapper", ftp ());
+
 %!test
 %! pyexec ("def pyfunc(x):\n    return 2*x");
 %! z = pycall ("pyfunc", [20 20]);