Feature Requests item #1758910, was opened at 2007-07-23 09:59
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=351645&aid=1758910&group_id=1645
Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Priority: 5
Private: No
Submitted By: locus91 (locus91)
Assigned to: Nobody/Anonymous (nobody)
Summary: Provide more control of %init section for Lua modules
Initial Comment:
SWIG provides a configuration mechanism for modules, %init (Section 5.6.4 of the SWIG 1.3 Documentation). For the Lua language module, the code that the user supplies is executed before a module is initialized (e.g. before any symbols are loaded into the environment). For the Lua language, this means that one can not add code into the "%init" module that makes use of the new symbols, but must instead add further initialization code outside of the module that executes after it has been loaded. For instance, the simple act of defining aliases in Lua for the symbols that are being created, can not be performed until after the symbols have been defined.
It would be useful to do amend the implementation of the %init section for Lua modules to do one of the following: (a) move the invocation of SWIG_init_user() to the bottom of SWIG_init() for Lua such as just before "end module"; (b) add a parameter to %init that allows more than one instance to be specified, and define the point during module initialization at which it is to be inserted; or (c) add a new "%initLate" section to the SWIG configuration language.
----------------------------------------------------------------------
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=351645&aid=1758910&group_id=1645