swig/Source/Modules
Vadim Zeitlin 818b399c9e Drastically simplify and optimize object creation and destruction
Don't populate the typenames array for each and every created object and don't
search it when deleting every object, this is O(N) in number of classes and is
completely impractical for any big library where N can easily be several
thousands. Use destructor function which will correctly destroy the object
instead.

Also don't store each created objects in the global registry, there doesn't
seem to be any point in it.

And, in fact, don't bother with the typenames at all, just use another
pseudo-virtual function for checking whether a class inherits from a class
with the given name.

There is unfortunately one problem with the new approach: it doesn't work when
the same C++ type is wrapped under different names as this results in multiple
specializations of SWIG_derives_from<> for this type. But this is a relatively
rare situation (but which does arise in template_default2 unit test, which had
to be disabled) and could be fixed in the future by completely resolving the
type, including the default template parameters values, and checking if
SWIG_derives_from had been already specialized for it. In the meanwhile, this
regression is not a big deal compared to the advantages of the new approach.
2016-04-15 23:25:32 +02:00
..
allegrocl.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
allocate.cxx Re-organization of the interface feature common code 2016-03-03 08:55:20 +00: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
c.cxx Drastically simplify and optimize object creation and destruction 2016-04-15 23:25:32 +02:00
cffi.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
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 Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
d.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
directors.cxx Add support for thread_local when specified with other legitimate storage class specifiers - extern and static 2013-02-08 06:36:39 +00:00
emit.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
go.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
guile.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
interface.cxx Interface feature fix for typedef types 2016-03-07 21:42:27 +00:00
java.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
javascript.cxx Cosmetic corrections - Mac OS X 2015-08-02 20:14:20 +01:00
lang.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
lua.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
main.cxx Warning fixes for 64bit visual c++ on Windows 2015-07-03 20:59:24 +01:00
modula3.cxx Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
module.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
mzscheme.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
nested.cxx Fix segmentation fault when top==NULL 2015-02-26 14:57:19 +13:00
ocaml.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
octave.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
overload.cxx Clearer warning message for badly constructed typecheck typemaps 2015-04-14 07:34:40 +01:00
perl5.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
php.cxx Merge branch 'char-escaping' 2016-03-12 23:27:51 +00:00
pike.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
python.cxx Merge branch 'ahnolds-py_gettar' 2016-04-02 18:06:03 +01:00
r.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
README File move 2002-12-03 20:33:35 +00:00
ruby.cxx Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
s-exp.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
scilab.cxx scilab: fix builder for scilab 6.0 (empty matrix error) 2016-03-02 05:14:44 -05:00
swigmain.cxx Merge branch 'master' into C 2016-04-08 17:29:16 +02:00
swigmod.h Add checks for interface name symbol clashes 2016-03-03 22:48:35 +00:00
tcl8.cxx Prevent redefinition warnings when compiling with SWIG<module> defined 2015-12-22 14:33:21 +02:00
typepass.cxx %shared_ptr support improvements for classes in an inheritance chain 2015-10-01 22:36:01 +01:00
uffi.cxx Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
utils.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
xml.cxx Remove cvs/svn Id strings 2013-01-12 01:21:16 +00: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