view test/mex/bug_54096.c @ 31205:b0e90ca8e679 stable

quad2d: fix unintended complex conjugate return (bug #62972) quad2d: use .' instead of ' to avoid complex conjugate in q and qerr.
author Arun Giridhar <arungiridhar@gmail.com>
date Sun, 28 Aug 2022 12:21:17 -0400
parents e255f09dc70e
children
line wrap: on
line source

#include "mex.h"

static const char* field_names[] = {"field"};

void mexFunction (int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[])
{
  mxArray *tmp_val;

  plhs[0] = mxCreateStructMatrix (1, 1, 1, field_names);

  mxSetFieldByNumber (plhs[0], 0, 0, NULL);

  tmp_val = mxGetFieldByNumber (plhs[0], 0, 0);

  if (tmp_val)
    mexErrMsgTxt ("struct elements set to NULL should be NULL internally");

  /* But in the interpreter, they should appear as [].  */
}