swig/Source/Modules
William S Fulton 6b5da094b2 Simpler Python -builtin import
When using -builtin, the two step C-extension module import is now
one step and the wrapped API is only available once and not in an underlying
module attribute like it is without -builtin. To understand this, consider a
module named 'example' (using: %module example). The C-extension is compiled into
a Python module called '_example' and a pure Python module provides the actual
API from the module called 'example'. It was previously possible to additionally
access the API from the module attribute 'example._example'. The latter was an
implementation detail and is no longer available. It shouldn't have been used, but
if necessary it can be resurrected using the moduleimport attribute described in the
Python chapter of the documentation. If both modules are provided in a Python
package, try:

  %module(moduleimport="from . import _example\nfrom ._example import *") example
or more generically:
  %module(moduleimport="from . import $module\nfrom .$module import *") example

and if both are provided as global modules, try:

  %module(moduleimport="import _example\nfrom _example import *") example
or more generically:
  %module(moduleimport="import $module\nfrom $module import *") example

The module import code shown will appear in the example.py file.
2018-11-28 23:36:13 +00:00
..
allegrocl.cxx Remove code duplication of Swig_overload_rank 2017-09-11 23:18:55 +01:00
allocate.cxx Misc. typos 2018-05-17 10:04:23 -04:00
browser.cxx Add lambda functions to the symbol tables and add ability to suppress lambda warnings. 2013-02-04 20:05:34 +00:00
cffi.cxx Add support for "ret" typemap where missing and improve documentation on it. 2016-09-29 08:07:26 +01:00
chicken.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
clisp.cxx Fix assertion for some languages when wrapping a C++11 enum class that is private in a class. 2016-03-31 20:27:36 +01:00
contract.cxx Cosmetics/code beautification of nested class support 2013-11-29 07:29:58 +00:00
csharp.cxx Fix class having method Connect() creating a name collision with SwigDirectorConnect(). 2018-09-06 12:43:51 +03:00
d.cxx Misc. typos 2018-05-17 10:04:23 -04:00
directors.cxx Generation of director method declarations fixes 2017-10-23 18:55:14 +01:00
emit.cxx Cosmetic whitespace improvement in generated code from throws typemaps. 2017-11-29 20:32:15 +00:00
go.cxx Misc. typos 2018-05-17 10:04:23 -04:00
guile.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
interface.cxx Fix seg fault with %interface and using declarations 2017-08-21 18:34:51 +01:00
java.cxx Doxygen JavaDoc class comments fix 2018-06-17 00:17:07 +01:00
javascript.cxx follow-up typos 2018-05-17 10:26:00 -04:00
lang.cxx Merge branch 'vadz-doxygen' 2018-06-07 08:13:10 +01:00
lua.cxx follow-up typos 2018-05-17 10:26:00 -04:00
main.cxx Remove support for PHP5 2018-06-07 18:09:03 +12:00
modula3.cxx Misc. typos 2018-05-17 10:04:23 -04:00
module.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
mzscheme.cxx Misc. typos 2018-05-17 10:04:23 -04:00
nested.cxx Fix segmentation fault when top==NULL 2015-02-26 14:57:19 +13:00
ocaml.cxx Fix comment typo "aruments" 2018-05-29 09:00:18 +12:00
octave.cxx Remove -cppcast and -nocppcast command line options 2018-11-13 07:36:09 +00:00
overload.cxx Python fastdispatch error message improvements 2018-08-10 08:14:19 +01:00
perl5.cxx Remove -cppcast and -nocppcast command line options 2018-11-13 07:36:09 +00:00
php.cxx [php] Drop support for long-deprecated %pragma(php4) 2018-06-07 18:09:14 +12:00
pike.cxx Fix GCC 7 warnings 2016-12-21 13:05:20 +13:00
python.cxx Simpler Python -builtin import 2018-11-28 23:36:13 +00:00
r.cxx Remove -cppcast and -nocppcast command line options 2018-11-13 07:36:09 +00:00
README File move 2002-12-03 20:33:35 +00:00
ruby.cxx Remove -cppcast and -nocppcast command line options 2018-11-13 07:36:09 +00:00
s-exp.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
scilab.cxx fix Scilab 6.0.0 linking issue 2017-05-30 14:42:44 +02:00
swigmain.cxx Remove support for PHP5 2018-06-07 18:09:03 +12:00
swigmod.h Python fastdispatch error message improvements 2018-08-10 08:14:19 +01:00
tcl8.cxx Remove -cppcast and -nocppcast command line options 2018-11-13 07:36:09 +00:00
typepass.cxx Merge branch 'templates-scope-enforcement' 2017-08-16 21:44:51 +01:00
uffi.cxx Seg fault fix running uffi tests 2018-01-14 13:27:01 +00:00
utils.cxx Fix various comment and documentation typos 2017-08-13 18:04:33 +12:00
xml.cxx Update xml.cxx to return typenames (#777) 2016-09-27 15:15:47 +13:00

06/25/2002

This directory contains all of the SWIG language modules.  Many of these
modules contain code that dates back to SWIG1.0.  The module API has changed
a lot in the development releases so this is fairly messy.  We're working on
cleaning it up, but you'll have to bear with us until it's done.

-- Dave