diff options
author | Steven Knight <knight@baldmt.com> | 2003-05-07 11:52:31 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-05-07 11:52:31 (GMT) |
commit | 28cc07ab75b300171d03395b7dedfae5a77cdc2d (patch) | |
tree | 4786f243ee697a57bff6b8cb7c268b310627ae95 /src/engine/SCons/Node/__init__.py | |
parent | aaf2cbb74e00fdc89da432d18e9fe40bb7de3b9d (diff) | |
download | SCons-28cc07ab75b300171d03395b7dedfae5a77cdc2d.zip SCons-28cc07ab75b300171d03395b7dedfae5a77cdc2d.tar.gz SCons-28cc07ab75b300171d03395b7dedfae5a77cdc2d.tar.bz2 |
Improve new post-PathList refactoring performance. (Charles Crain)
Diffstat (limited to 'src/engine/SCons/Node/__init__.py')
-rw-r--r-- | src/engine/SCons/Node/__init__.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/engine/SCons/Node/__init__.py b/src/engine/SCons/Node/__init__.py index 883d757..5231f90 100644 --- a/src/engine/SCons/Node/__init__.py +++ b/src/engine/SCons/Node/__init__.py @@ -628,7 +628,7 @@ class Node: generator is being called to generate a signature for the command line, which determines if we should rebuild or not. - Such command generators should use this method in preference + Such command generators shoud use this method in preference to str(Node) when converting a Node to a string, passing in the for_signature parameter, such that we will call Node.for_signature() or str(Node) properly, depending on whether @@ -638,6 +638,21 @@ class Node: return self.for_signature() return str(self) + def get_subst_proxy(self): + """ + This method is expected to return an object that will function + exactly like this Node, except that it implements any additional + special features that we would like to be in effect for + Environment variable substitution. The principle use is that + some Nodes would like to implement a __getattr__() method, + but putting that in the Node type itself has a tendency to kill + performance. We instead put it in a proxy and return it from + this method. It is legal for this method to return self + if no new functionality is needed for Environment substitution. + """ + return self + + def get_children(node, parent): return node.children() def ignore_cycle(node, stack): pass def do_nothing(node, parent): pass |