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
..
allegrocl
minor formatting change
2010-04-23 06:44:47 +00:00
cffi
Change typemap matching rules for the default type (SWIGTYPE) to follow template partial specialization type deduction. Fixes some containers of const pointers. SWIGTYPE*& typemps removed and replaced with SWIGTYPE *const&.
2010-04-01 18:26:37 +00:00
chicken
Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
2011-01-14 19:06:43 +00:00
clisp
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
csharp
Remove incomplete directorin typemaps as users incorrectly assumed they were implemented and working
2011-05-03 05:46:00 +00:00
d
Remove incomplete directorin typemaps as users incorrectly assumed they were implemented and working
2011-05-03 05:46:00 +00:00
gcj
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
go
Remove incomplete directorin typemaps as users incorrectly assumed they were implemented and working
2011-05-03 05:46:00 +00:00
guile
Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
2011-01-14 19:06:43 +00:00
java
Remove incomplete directorin typemaps as users incorrectly assumed they were implemented and working
2011-05-03 05:46:00 +00:00
lua
Cosmetic improvements in generated code
2011-03-26 23:25:52 +00:00
modula3
Change typemap matching rules for the default type (SWIGTYPE) to follow template partial specialization type deduction. Fixes some containers of const pointers. SWIGTYPE*& typemps removed and replaced with SWIGTYPE *const&.
2010-04-01 18:26:37 +00:00
mzscheme
Apply Ubuntu patch to fix Mzscheme std::map wrappers
2010-04-09 23:04:59 +00:00
ocaml
[Ocaml] Apply patch #3151788 from Joel Reymont. Brings Ocaml support a up to date (ver 3.11 and 3.12), including std::string.
2011-02-14 07:22:06 +00:00
octave
Allow global operators to be SWIG-wrapped functions (by Karl Wette)
2011-05-17 02:02:15 +00:00
perl5
Perl and vc++ warning fix
2011-02-20 18:37:46 +00:00
php
[PHP] Fix sharing of type information between multiple SWIG-wrapped modules (SF#3202463).
2011-03-12 01:38:27 +00:00
pike
Added some missing multi-argument typemaps: (char *STRING, size_t LENGTH) and (char *STRING, int LENGTH) - Java patch is from Volker Grabsch. Elements of the primitive_types.i testcase for this moved into char_binary.i. Documentation for this enhanced.
2011-01-14 19:06:43 +00:00
python
cosmetic - cleanup
2011-05-14 00:10:10 +00:00
r
Apply patch #3239076 from Marie White fixing strings for R >= 2.7.0
2011-03-29 20:14:59 +00:00
ruby
patch #3176274 - Ruby typecheck typemap for time_t.
2011-02-13 22:19:46 +00:00
std
Fixed bug 2811549: const vs. non-const iterators for STL types.
2011-04-29 22:36:06 +00:00
tcl
Apply patch #3284326 to fix some compiler warnings.
2011-04-11 23:04:28 +00:00
typemaps
Remove VARARGS_SENTINEL typemaps further to revision 12666. Note that the idea of having a named typemap for sentinels is flawed unless the named typemap is provided for every single type in the typemap library.
2011-05-14 23:54:09 +00:00
uffi
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
xml
delete the perl5 typemaps, ignored here
2006-01-05 19:34:51 +00:00
allkw.swg
Added support for the D programming languge.
2010-11-18 00:24:02 +00:00
attribute.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
carrays.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
cdata.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
cmalloc.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
constraints.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
cpointer.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
cstring.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
cwstring.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
exception.i
Added support for the D programming languge.
2010-11-18 00:24:02 +00:00
intrusive_ptr.i
shared_ptr improvements so the proxy class does not need to be specified - SWIG_SHARED_PTR macro deprecated and replaced by %shared_ptr
2010-05-22 23:57:19 +00:00
inttypes.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
linkruntime.c
fix macro issue reported by Vladimir Menshakov
2006-04-10 19:00:44 +00:00
math.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
pointer.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
runtime.swg
fix VC++ warning
2005-09-29 13:17:05 +00:00
shared_ptr.i
Add std_shared_ptr.i and document shared_ptr library
2010-06-01 19:03:55 +00:00
std_except.i
Added support for the D programming languge.
2010-11-18 00:24:02 +00:00
stdint.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
stl.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
swig.swg
Remove VARARGS_SENTINEL typemaps further to revision 12666. Note that the idea of having a named typemap for sentinels is flawed unless the named typemap is provided for every single type in the typemap library.
2011-05-14 23:54:09 +00:00
swigarch.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
swigerrors.swg
add the null reference error
2005-12-27 22:01:39 +00:00
swiginit.swg
[lua] updated configure script yet again
2008-01-24 06:16:45 +00:00
swiglabels.swg
Suppress unused methods warning for VC++
2008-06-22 22:12:43 +00:00
swigrun.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
swigrun.swg
Fix typo in comment
2010-06-20 15:27:34 +00:00
swigwarnings.swg
Fix a few typos.
2008-05-19 20:23:50 +00:00
wchar.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00
windows.i
SWIG license change - The Examples and Lib move to a very permissive license in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
2010-02-27 23:26:02 +00:00