+2024-04-16 Collin Funk <collin.funk1@gmail.com>
+
+ gnulib-tool.py: Make data structures more clear.
+ * pygnulib/GLModuleSystem.py (GLModuleTable.__init__): Use a set to
+ represent the unconditional modules instead of a dictionary. Remove
+ redundant comments.
+ (GLModuleTable.addUnconditional): Add the module to a set instead of
+ using it as a key to the dictionary.
+
2024-04-16 Bruno Haible <bruno@clisp.org>
setpayloadl: Add tests.
returns the condition when B should be enabled as a dependency of A,
once the m4 code for A has been executed.
'''
- self.dependers = dict() # Dependencies
- self.conditionals = dict() # Conditional modules
- self.unconditionals = dict() # Unconditional modules
- self.base_modules = [] # Base modules
- self.main_modules = [] # Main modules
- self.tests_modules = [] # Tests modules
- self.final_modules = [] # Final modules
+ self.dependers = dict()
+ self.conditionals = dict()
+ self.unconditionals = set()
+ self.base_modules = []
+ self.main_modules = []
+ self.tests_modules = []
+ self.final_modules = []
if type(config) is not GLConfig:
raise TypeError('config must be a GLConfig, not %s'
% type(config).__name__)
if type(module) is not GLModule:
raise TypeError('module must be a GLModule, not %s'
% type(module).__name__)
- self.unconditionals[str(module)] = True
+ self.unconditionals.add(str(module))
if str(module) in self.dependers:
self.dependers.pop(str(module))