changeset 65:11cff59bc932 pytave-task

Let Octave reread changed files
author David Grundberg <individ@acc.umu.se>
date Mon, 08 Jun 2009 21:26:56 +0200
parents 37fd244f015e
children c19f5826b843 af96f7e819e2
files ChangeLog pytave.cc
diffstat 2 files changed, 10 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jun 08 21:00:10 2009 +0200
+++ b/ChangeLog	Mon Jun 08 21:26:56 2009 +0200
@@ -1,3 +1,7 @@
+2009-06-08  David Grundberg  <individ@acc.umu.se>
+
+	* pytave.cc (func_eval, str_eval): Reread changed files.
+
 2009-06-08  David Grundberg  <individ@acc.umu.se>
 
 	* test/test.py: New tests for pytave.globals and pytave.locals.
--- a/pytave.cc	Mon Jun 08 21:00:10 2009 +0200
+++ b/pytave.cc	Mon Jun 08 21:26:56 2009 +0200
@@ -137,6 +137,9 @@
 
       reset_error_handler();
       buffer_error_messages++;
+
+      // Updating the timestamp makes Octave reread changed files
+      Vlast_prompt_time.stamp();
       
       Py_BEGIN_ALLOW_THREADS
       retval = feval(funcname, octave_args, (nargout >= 0) ? nargout : 0);
@@ -177,6 +180,9 @@
 
       reset_error_handler();
       buffer_error_messages++;
+
+      // Updating the timestamp makes Octave reread changed files
+      Vlast_prompt_time.stamp();
       
       Py_BEGIN_ALLOW_THREADS
       retval = eval_string(code, silent, parse_status,