diff options
author | Steven Knight <knight@baldmt.com> | 2010-03-08 16:56:14 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-03-08 16:56:14 (GMT) |
commit | 091206d11bce4512dd11b9bf9ff25d6a8899b886 (patch) | |
tree | 897920db7cde361e044b8ab788ecef0878f04694 /bin/SConsDoc.py | |
parent | 39430b2588036dc2b094f60ae149c5704d5c7800 (diff) | |
download | SCons-091206d11bce4512dd11b9bf9ff25d6a8899b886.zip SCons-091206d11bce4512dd11b9bf9ff25d6a8899b886.tar.gz SCons-091206d11bce4512dd11b9bf9ff25d6a8899b886.tar.bz2 |
Handle different signatures for global or env versions of functions
by the signature specification from the <scons_function> tag to
the <arguments> tag.
Diffstat (limited to 'bin/SConsDoc.py')
-rw-r--r-- | bin/SConsDoc.py | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/bin/SConsDoc.py b/bin/SConsDoc.py index cd78195..3f64a25 100644 --- a/bin/SConsDoc.py +++ b/bin/SConsDoc.py @@ -134,10 +134,9 @@ class Builder(Item): pass class Function(Item): - def __init__(self, name, global_signature, env_signature): + def __init__(self, name): super(Function, self).__init__(name) - self.global_signature = global_signature - self.env_signature = env_signature + self.arguments = [] class Tool(Item): def __init__(self, name): @@ -160,10 +159,11 @@ class Chunk: self.body.append(data) class Arguments: - def __init__(self, body=None): + def __init__(self, signature, body=None): if not body: body = [] self.body = body + self.signature = signature def __str__(self): s = ''.join(self.body).strip() result = [] @@ -299,9 +299,7 @@ class SConsDocHandler(xml.sax.handler.ContentHandler, try: function = self.functions[name] except KeyError: - function = Function(name, - attrs.get('global', "1"), - attrs.get('env', "1")) + function = Function(name) self.functions[name] = function self.begin_xxx(function) def end_scons_function(self): @@ -330,8 +328,8 @@ class SConsDocHandler(xml.sax.handler.ContentHandler, self.end_xxx() def start_arguments(self, attrs): - arguments = Arguments() - self.current_object.arguments = arguments + arguments = Arguments(attrs.get('signature', "both")) + self.current_object.arguments.append(arguments) self.begin_xxx(arguments) self.begin_collecting(arguments) def end_arguments(self): |