swig/Source
Xavier Delacour 06221dacae Allow global operators to be SWIG-wrapped functions (by Karl Wette)
The Octave run-time allows global operators to be implemented,
e.g. op_scalar_add_X for adding a scalar and a wrapped struct X.
However it doesn't currently seem possible for these operators to
map to SWIG-wrapped functions. This is because dispatch_global_op()
looks for the operators to be installed as global variables, whereas
install_global() installs SWIG-wrapped functions as builtin functions;
the two appear to be separate symbol tables in Octave.

This patch modifies install_global() to install global operator functions
as both builtin functions and as global variables, where the value of the
global variable is a function handle to the operator function. It decides
if a function is a global operator if it begins with the prefix "op_"; this
prefix can be modified through a new command-line variable. It also always
installs the operators globally, regardless of whether the rest of the module
is being loaded globally. To accomplish this, install_global() is now always
called, but takes a bool argument specifying whether it should load symbols
globally. If a function is not a global operator, install_global() should
behave as before.

Tested that this compiles and works on Octave 3.2.4 and 3.4.0.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12675 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-17 02:02:15 +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 Allow global operators to be SWIG-wrapped functions (by Karl Wette) 2011-05-17 02:02:15 +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.