octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API


From: Rik
Subject: [Octave-bug-tracker] [bug #51725] Adding mxGetProperty to Matlab API
Date: Fri, 11 Aug 2017 19:14:26 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0

Follow-up Comment #9, bug #51725 (project octave):

@Piotr: Even though Matlab happily lets the code segfault, we could decide to
be a bit better than that and implement some checks.  However, given that time
is limited I would rather spend time on Octave than the MEX API which isn't
used too frequently.  For that reason, rather than correctness, I think we can
let this be.

@jwe: I suppose you could introduce an intermediate variable and then check
for NULL and issue an error.  For my purposes, NOT_FOUND = NULL = [] so I just
checked for [].

I don't absolutely know that it is safe, but I believe the translation back
from *mxArray to octave_value involves calling the octave_value constructor. 
If the input is NULL this is translated to an empty matrix of double type.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?51725>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]