swig/Source
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
..
CParse %varargs - better documentation and remove additional argument generation which didn't work properly as a sentinel 2011-05-14 00:13:43 +00:00
DOH Remove redundant code highlighted by warnings in gcc-4.6 2011-03-14 07:22:08 +00:00
Include Change preprocessing error for tokens appearing after #else and #end to warning. Add some missing warning documentation and a couple of warning messages tidy up. 2011-02-17 21:54:13 +00:00
Modules Octave changes by Karl Wette: 2011-05-17 01:56:43 +00:00
Preprocessor Fix regression introduced in swig-2.0.2 where filenames with spaces were not found when used with %include and %import 2011-03-17 07:33:05 +00:00
Swig [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
Makefile.am Added support for the D programming languge. 2010-11-18 00:24:02 +00:00
README update this README 2008-11-03 13:32:33 +00:00

SWIG Source directory

 Source/DOH          -  A core set of basic datatypes including
                        strings, lists, hashes, and files.  Used
                        extensively by the rest of SWIG.

 Source/Swig         -  Swig core. Type-system, utility functions.

 Source/Preprocessor -  SWIG C Preprocessor

 Source/CParse       -  SWIG C Parser (still messy)

 Source/Modules      -  Language modules.

 Source/Include      -  Include files.

Historic directories which may be in CVS, but have been removed:

 Source/Modules1.1   -  Old SWIG-1.1 modules. Empty.

 Source/LParse       -  Experimental parser.  Officially dead
                        as CParse is more capable.

 Source/SWIG1.1      -  Old SWIG1.1 core. Completely empty now.