def configuration_signature(config):
sig = hashlib.sha1()<EOL>if isinstance(config, cxx_parsers_cfg.xml_generator_configuration_t):<EOL><INDENT>sig.update(str(config.xml_generator_path).encode())<EOL><DEDENT>sig.update(str(config.working_directory).encode('<STR_LIT:utf-8>'))<EOL>if isinstance(config, cxx_parsers_cfg.xml_generator_configuration_t):<EOL><INDENT>sig.update(str(config.cflags).encode('<STR_LIT:utf-8>'))<EOL><DEDENT>for p in config.include_paths:<EOL><INDENT>sig.update(str(p).encode('<STR_LIT:utf-8>'))<EOL><DEDENT>for s in config.define_symbols:<EOL><INDENT>sig.update(str(s).encode('<STR_LIT:utf-8>'))<EOL><DEDENT>for u in config.undefine_symbols:<EOL><INDENT>sig.update(str(u).encode('<STR_LIT:utf-8>'))<EOL><DEDENT>return sig.hexdigest()<EOL>
Return a signature for a configuration (xml_generator_configuration_t)
object.

This can then be used as a key in the cache.
This method must take into account anything about
a configuration that could cause the declarations generated
to be different between runs.