changeset 11263:c78247b664fc

allow private functions to find private functions
author John W. Eaton <jwe@octave.org>
date Wed, 17 Nov 2010 14:38:17 -0500
parents 4a84b9547f26
children 79b77d71d01e
files src/ChangeLog src/pt-fcn-handle.cc src/symtab.cc
diffstat 3 files changed, 16 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Nov 17 14:37:13 2010 -0500
+++ b/src/ChangeLog	Wed Nov 17 14:38:17 2010 -0500
@@ -1,3 +1,9 @@
+2010-11-17  John W. Eaton  <jwe@octave.org>
+
+	* pt-fcn-handle.cc (tree_anon_fcn_handle::rvalue1): Also stash
+	the directory name of the parent function in the newly created
+	anonymous function.  Bug #31484.
+
 2010-11-17  John W. Eaton  <jwe@octave.org>
 
 	* oct-parse.yy (parse_fcn_file): Protect and set global_command
--- a/src/pt-fcn-handle.cc	Wed Nov 17 14:37:13 2010 -0500
+++ b/src/pt-fcn-handle.cc	Wed Nov 17 14:38:17 2010 -0500
@@ -112,7 +112,11 @@
 
   if (curr_fcn)
     {
+      // FIXME -- maybe it would be better to just stash curr_fcn
+      // instead of individual bits of info about it?
+
       uf->stash_parent_fcn_name (curr_fcn->name ());
+      uf->stash_dir_name (curr_fcn->dir_name ());
 
       symbol_table::scope_id parent_scope = curr_fcn->parent_fcn_scope ();
 
--- a/src/symtab.cc	Wed Nov 17 14:37:13 2010 -0500
+++ b/src/symtab.cc	Wed Nov 17 14:38:17 2010 -0500
@@ -613,6 +613,12 @@
         {
           if (curr_fcn)
             {
+              // FIXME -- maybe it would be better if we could just get
+              // a pointer to the parent function so we would have
+              // access to all info about it instead of only being able
+              // to query the current function for specific bits of info
+              // about its parent function?
+
               scope_id pscope = curr_fcn->parent_fcn_scope ();
 
               if (pscope > 0)