[swig] Do not assume (in)SiconosMatrix& is not SP
@@ -788,6 +788,10 @@ struct IsDense : public Question<bool>
void * swig_argp;
int swig_res = SWIG_ConvertPtr(obj, &swig_argp, $descriptor(SiconosMatrix *), 0 | 0);
+ if (!SWIG_IsOK(swig_res))
+ {
+ swig_res = SWIG_ConvertPtr(obj, &swig_argp, $descriptor(SP::SiconosMatrix *), 0 | 0);
+
if (!SWIG_IsOK(swig_res))
{
SP::SiconosMatrix tmp = SimpleMatrix_from_numpy(obj, array_p, is_new_object);
@@ -796,6 +800,12 @@ struct IsDense : public Question<bool>
*c_result = tmp.get();
}
else if (swig_argp)
+ {
+ *c_result = (reinterpret_cast< SP::SiconosMatrix * >(swig_argp))->get();
+ if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< SP::SiconosMatrix * >(swig_argp);
+ }
+ }
+ else if (swig_argp)
{
*c_result = (reinterpret_cast< SiconosMatrix * >(swig_argp));
if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< SiconosMatrix * >(swig_argp);
@@ -808,6 +818,10 @@ struct IsDense : public Question<bool>
void * swig_argp;
int swig_res = SWIG_ConvertPtr(obj, &swig_argp, $descriptor(SimpleMatrix *), 0 | 0);
+ if (!SWIG_IsOK(swig_res))
+ {
+ swig_res = SWIG_ConvertPtr(obj, &swig_argp, $descriptor(SP::SimpleMatrix *), 0 | 0);
+
if (!SWIG_IsOK(swig_res))
{
SP::SimpleMatrix tmp = SimpleMatrix_from_numpy(obj, array_p, is_new_object);
@@ -816,6 +830,12 @@ struct IsDense : public Question<bool>
*c_result = tmp.get();
}
else if (swig_argp)
+ {
+ *c_result = (reinterpret_cast< SP::SimpleMatrix * >(swig_argp))->get();
+ if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< SP::SimpleMatrix * >(swig_argp);
+ }
+ }
+ else if (swig_argp)
{
*c_result = (reinterpret_cast< SimpleMatrix * >(swig_argp));
if (SWIG_IsNewObj(swig_res)) delete reinterpret_cast< SimpleMatrix * >(swig_argp);
