William S Fulton
cc85a98f73
Remove duplicate macros when using -external-runtime
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-28 06:38:46 +00:00
William S Fulton
3aafb96325
Bug fix: Remove root directory from directory search list in Windows.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-18 07:03:49 +00:00
William S Fulton
f13d958214
same class name in different namespaces confusion when using multiple modules.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-13 17:08:15 +00:00
William S Fulton
24133bacd7
Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
Robert Stone
fb9750698f
mainly for SF bug #3423119
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-24 20:31:06 +00:00
William S Fulton
91d22324e7
Add support for eLua including options for Lua Tiny RAM (LTR)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12813 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-16 22:53:35 +00:00
William S Fulton
4c6f66577a
Add warnings for badly named destructors. Fix %extend and destructors for templates - they weren't always being wrapped. Fix destructor "name" attribute.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12804 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-13 06:15:29 +00:00
William S Fulton
a141af9574
Fix regression introduced in r12784 where SWIG accepts a non standard constructor and destructor name in %extend, where the typedef name is used as the constructor/destructor name.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12801 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-09-08 18:19:45 +00:00
Stefan Zager
b61ccd00ec
Bug 3400486: Fix error signalling for built-in constructors.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12792 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-30 21:37:16 +00:00
William S Fulton
d2dd3c0674
Fix file/line number display for gotype when using typemap debugging options
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12786 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-26 19:01:50 +00:00
William S Fulton
8b9afd0772
Fix %callback which was generating uncompileable code for C# and D
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12785 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-26 18:05:50 +00:00
William S Fulton
30206f975c
Fix constructors in named typedef class declarations
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-25 19:27:38 +00:00
William S Fulton
932f47a845
SF patch #3394339 from Torsten Landschoff - new option -nomoduleglobal to disable installing the module table into the global namespace. Require call also returns the module table instead of a string
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12780 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-22 19:27:56 +00:00
William S Fulton
d0081ebb82
%shared_ptr fixes when the type is a template using template parameters that are typedef'd to another type. Also fixed %shared_ptr when the template parameter has a default value.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-13 00:36:12 +00:00
William S Fulton
44c202d048
Add in $symname expansion for director methods
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-04 19:45:19 +00:00
Olly Betts
210266cd70
[PHP] Don't generate "return $r;" in cases where $r hasn't been set.
...
This was basically harmless, except it generated a PHP E_NOTICE if
the calling code had enabled them.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-29 10:51:02 +00:00
William S Fulton
7d038d4bd7
Fix scoping of forward class declarations nested within a class (for C++). Also fix %template and resolution of template parameters that are typedefs.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-26 19:34:23 +00:00
Stefan Zager
498367bc9d
From swig-user 7/6/11: fix closure for tp_call.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12761 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-20 15:20:24 +00:00
Olly Betts
62a88f3613
Fix comment typoes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12758 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-15 06:57:25 +00:00
Stefan Zager
0df6937fbf
Bug 3324753: fix %rename for member variables under -builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12756 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-14 05:15:05 +00:00
William S Fulton
6c100423b8
Fix some scope and symbol lookup problems when template default parameters are being used with typedef - add the fully expanded template into the c symbol table and scope table.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12754 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-07-01 22:59:55 +00:00
Olly Betts
688ea24560
[PHP] Fix director code to work when PHP is built with ZTS enabled,
...
which is the standard configuration on Microsoft Windows.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12749 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-23 16:04:42 +00:00
Mikel Bancroft
b8dcf31539
[allegrocl] Small set of bug fixes and typemap tweaks.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12748 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-21 18:51:25 +00:00
William S Fulton
72ffdb930d
Repeat autodoc fixes for Octave and Ruby as done previously for Python
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 20:46:20 +00:00
William S Fulton
58e74e8675
Rename python_kwargs testcase to kwargs_feature. Add kwargs_feature to Ruby and fix Ruby warnings when using kwargs feature. Add %kwargs macro for Ruby
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 17:38:08 +00:00
William S Fulton
a4f8ed4fc9
Fix last checkin for renamed parameters
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 20:26:07 +00:00
William S Fulton
3243cbaad4
Numerous autodoc fixes for Python
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-10 19:33:40 +00:00
Olly Betts
29190559f8
SWIG_ZTS_SetPointerZval() now interprets bit 1 in newobject as meaning (wrap
...
in a PHP class wrapper), rather than taking newobject==2 as meaning this,
so we can wrap new and existing objects in this way.
Handle wrapping classes in a C++ namespace being returned by director methods.
No need to force classname to lowercase as zend_lookup_class() does that
internally.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12723 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-30 06:47:47 +00:00
Olly Betts
dce3b5bacf
[PHP] Fix handling of directors when -prefix is used.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12722 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-30 04:49:29 +00:00
Olly Betts
1d7f309a8a
[PHP] Fix handling of methods of classes with a virtual base class (SF#3124665).
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12711 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-24 14:51:59 +00:00
William S Fulton
315dd8fb2f
Add in error handling in the even of not being able to find a base when initializing a builtin type - should the base not be loaded
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-20 05:58:05 +00:00
William S Fulton
e71624749a
Apply #3289851 to fix memory leak in directors when checking for pending exceptions.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12681 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-17 19:15:50 +00:00
William S Fulton
1756036825
Help goes to stdout not stderr
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-17 05:47:23 +00:00
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
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
William S Fulton
b78392832f
[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.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12655 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-05 06:23:02 +00:00
William S Fulton
0b0b568515
Cosmetic - comments added
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12654 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-05-05 06:09:55 +00:00
Ian Lance Taylor
b8d2e9f8f6
Initialize a couple of members accidentally left uninitialized.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12647 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-30 06:02:28 +00:00
Stefan Zager
e629b192e2
Fixed the argument counts passed to SWIG_Python_UnpackTuple for varargs.
...
Removed obsolete methods from std_map.i and pyiterators.swg.
Added builtin-check target to python test suite Makefile.
Fixed using_namespace_loop.i so that the generated wrappers will compile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-29 18:25:16 +00:00
David Nadlinger
1dcc81fced
[D] nspace: Correctly generate identifiers for base classes when
...
not in split proxy mode.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-23 13:34:08 +00:00
Stefan Zager
8f07b3f851
Testcase and fix for bug 1163440: vararg typemaps.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-12 18:55:24 +00:00
Stefan Zager
257b75c23c
Fixed PyVarObject_HEAD_INIT calls for VC++.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12634 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 22:06:02 +00:00
William S Fulton
139ccc434e
Workaround incorrect gcc 4.4 and 4.5 warning with -O2 -Wextra in generated code
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-11 18:45:07 +00:00
David Nadlinger
f9def91f30
[D] Ported r12557 (char enum values).
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12630 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 16:10:42 +00:00
David Nadlinger
6c0f3f1a7d
[D] Fixed referencing types in the root namespace when not in split proxy mode.
...
Previously, invalid code would be generated for cases like the following if the nspace feature was active, but the split proxy mode not:
---
struct Foo {};
namespace Ns {
struct Bar {
void bar(const Foo &f) {}
};
}
---
Thanks to Johannes Pfau for reporting this.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12629 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:52 +00:00
David Nadlinger
3af2e27a3f
[D] Fixed qualified name handling, broken since r12588.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12628 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 14:02:29 +00:00
William S Fulton
781b468aa1
Sun Studio warning fixes for Python builtin
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:23:48 +00:00
William S Fulton
abdd41dc91
Restore extern "C" back to what it was to remove Solaris warnings
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 23:08:03 +00:00
Stefan Zager
8f876a6287
Minor tweaks to enable -builtin with C code.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-08 23:05:20 +00:00
Stefan Zager
5c4f47302a
Initialize all fields of PyTypeObject, to eliminate compiler warnings. Fixed typo in docs.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12612 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-05 23:16:13 +00:00