view test/bug-53027/ntest53027a.m @ 30192:8c8031be8072

Windows: Don't get pointers to C strings while vector is still unstable. * src/main-cli.cc, src/main-gui.cc, src/main.in.cc, src/octave-config.in.cc, src/octave-svgconvert.cc: The memory used by a vector is not guaranteed to be stable when elements are added with push_back. Wait until vector is complete before getting the pointers to the corresponding C strings.
author Markus Mützel <markus.muetzel@gmx.de>
date Thu, 16 Sep 2021 21:51:03 +0200
parents 2b040946dc69
children
line wrap: on
line source

function [m_exist, n_exist] = ntest53027a ()
  global x
  x = 3;
  n_exist = nest ();
  m_exist = exist ("x", 'var');
  function n_exist = nest ()
    x = 1;
    clear x
    n_exist = exist ("x", "var");
  endfunction
endfunction