swig/Source/Modules
Xavier Delacour 8848b16e01 Octave changes by Karl Wette:
It's currently not possible to tell SWIG whether or not symbols should be
loaded into the global namespace by default. In fact, it's not even possible
to make the generated .oct module *not* load all symbols globally, due to a
bug in Lib/octave/octruntime.swg (line 37: "noglobal" should be "global").
It's also not possible to change the name of the symbol used to access
global variables/constants from the default "cvar".

This patch adds 3 Octave-specific command-line options:

* -global/-noglobal tell SWIG whether the generated .oct module should load
symbols into the global namespace by default. The default option is -global
to preserve existing behaviour.

* -globals <name> sets the name of the symbol used to access global
variables/constants. It is set to "cvar" by default.

These options are parsed in Source/Modules/octave.cxx, and written to the
wrapping code as the macros SWIG_global_load and SWIG_global_name.

In Lib/octave/octruntime.swg, the Octave entry point DEFUN_DLD function now
contains a expanded input argument parser, which uses the same command-line
arguments (-global/-noglobal, -globals) as can be passed to SWIG itself;
this allows the module user to change the default loading behaviour of the
module user at load time. The parser checks for non-string and unrecognised
arguments, and also checks that the argument to -globals is a valid Octave
identifier. A -help option prints a short usage message.




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12670 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-17 01:56:43 +00:00
..
allegrocl.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
allocate.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
browser.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +00:00
cffi.cxx Better consistency in usage display 2011-03-09 21:42:38 +00:00
chicken.cxx Fix for a few affected target languages since last commit changed the way enum values that are type char are handled. 2011-03-26 23:25:14 +00:00
clisp.cxx Better consistency in usage display 2011-03-09 21:42:38 +00:00
contract.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +00:00
csharp.cxx SF bug #3195112 - fix wrapping of enums that are type char 2011-03-26 15:28:31 +00:00
d.cxx [D] nspace: Correctly generate identifiers for base classes when 2011-04-23 13:34:08 +00:00
directors.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +00:00
emit.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
go.cxx Initialize a couple of members accidentally left uninitialized. 2011-04-30 06:02:28 +00:00
guile.cxx Fix for a few affected target languages since last commit changed the way enum values that are type char are handled. 2011-03-26 23:25:14 +00:00
java.cxx SF bug #3195112 - fix wrapping of enums that are type char 2011-03-26 15:28:31 +00:00
lang.cxx Add in missing wrappers for friend functions for some target languages 2011-04-01 23:06:40 +00:00
lua.cxx [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded method with incorrect arguments improved to show always show fully qualified name and if a const method. Also fixed other Lua error messages in generated code which weren't consistently using the fully qualified C++ name. 2011-05-05 06:23:02 +00:00
main.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
modula3.cxx Better consistency in usage display 2011-03-09 21:42:38 +00:00
module.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +00:00
mzscheme.cxx Fix for a few affected target languages since last commit changed the way enum values that are type char are handled. 2011-03-26 23:25:14 +00:00
ocaml.cxx Fix for a few affected target languages since last commit changed the way enum values that are type char are handled. 2011-03-26 23:25:14 +00:00
octave.cxx Octave changes by Karl Wette: 2011-05-17 01:56:43 +00:00
overload.cxx Fix partial overloading warning messages appearing 2011-03-11 22:36:59 +00:00
perl5.cxx Better consistency in usage display 2011-03-09 21:42:38 +00:00
php.cxx [PHP] Fix handling of overloaded methods/functions where some 2011-03-14 12:33:56 +00:00
pike.cxx Fix for a few affected target languages since last commit changed the way enum values that are type char are handled. 2011-03-26 23:25:14 +00:00
python.cxx [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded method with incorrect arguments improved to show always show fully qualified name and if a const method. Also fixed other Lua error messages in generated code which weren't consistently using the fully qualified C++ name. 2011-05-05 06:23:02 +00:00
r.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
README File move 2002-12-03 20:33:35 +00:00
ruby.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
s-exp.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +00:00
swigmain.cxx Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
swigmod.h constify SwigType * in many places 2010-12-15 21:55:08 +00:00
tcl8.cxx [Lua, Python, Tcl] C/C++ prototypes shown in error message when calling an overloaded method with incorrect arguments improved to show always show fully qualified name and if a const method. Also fixed other Lua error messages in generated code which weren't consistently using the fully qualified C++ name. 2011-05-05 06:23:02 +00:00
typepass.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
uffi.cxx Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
utils.cxx Cosmetic - comments added 2011-05-05 06:09:55 +00:00
xml.cxx SWIG license change - Source moves to GPLv3 2010-02-27 23:53:33 +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