paularmstrong/swig — pull request #75 by kixxauth (2012-04-19 18:14:35+00:00)
Title: Kixxauth

This pull request allows several instances of the Swig engine to be used in the same runtime. It does this by passing around an optional `config` paramater to take the place of the private, but globally defined `_config` container. By defining `_config` at the module level, it was impossible to change configuration options between two different use cases in the same run time.

All public API functions work the same as they always have. If the optional `config` parameter is not passed to them, then the `_config` global will be used instead. The new `exports.engine()` constructor function can be called multiple times in the same runtime to create different instances of the Swig API with different configurations.