See source/nrnmatlab.cpp, function matlab_hoc_pushstr
By using a static char* here, we can only ever have one string on the stack, which is enough for our current example scripts. However, adding a second string changes the first one. Maybe this can be fixed in the future by using something like:
See
source/nrnmatlab.cpp
, functionmatlab_hoc_pushstr
By using a static char* here, we can only ever have one string on the stack, which is enough for our current example scripts. However, adding a second string changes the first one. Maybe this can be fixed in the future by using something like:
In that case we need to keep track of ts and free it later to prevent a memory leak. Moreover, hoc_temp_charptr can only hold 128 items.