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

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

[Octave-bug-tracker] [bug #54096] mxCreateStructMatrix with a NULL argum


From: Julien Bect
Subject: [Octave-bug-tracker] [bug #54096] mxCreateStructMatrix with a NULL argument creates a "corrupt" structure
Date: Mon, 11 Jun 2018 16:30:18 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0

Follow-up Comment #12, bug #54096 (project octave):

Note that, in Matlab, structures containing NULL pointers can be produced
directly, without a MEX-file.

Indeed, consider the struct x obtained as follows:

x = struct ();
x(2).a = 'yeah';


and assume that px is an mxArray* to x.  Then, mxGetField (px, 0, "a") returns
NULL, while mxGetField (px, 1, "a") returns a non-NULL pointer.

    _______________________________________________________

Reply to this item at:

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

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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