William S Fulton
027a38c71c
Remove -cppcast and -nocppcast command line options
...
The -cppcast option is still turned on by default. The -nocppcast option
to turn off the use of c++ casts (const_cast, static_cast etc) has been
removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts
instead of C++ casts for C++ wrappers.
This a revert of commit fc79264a48f186f8bbd367e91fa9dbf9758aa092:
"Revert "Remove -cppcast and -nocppcast command line options""
The Scilab and Javascript casting problems are now fixed, so -cppcast
is now switched on as default.
2018-11-13 07:36:09 +00:00
William S Fulton
fc79264a48
Revert "Remove -cppcast and -nocppcast command line options"
...
This reverts commit c06f2b4497
.
More work to be done as it breaks Scilab and Javascript tests.
2018-11-06 17:22:05 +00:00
William S Fulton
c06f2b4497
Remove -cppcast and -nocppcast command line options
...
The -cppcast option is still turned on by default. The -nocppcast option
to turn off the use of c++ casts (const_cast, static_cast etc) has been
removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts
instead of C++ casts for C++ wrappers.
2018-11-06 10:26:06 +00:00
Olly Betts
d721b4d639
Fix comment typo "aruments"
2018-05-29 09:00:18 +12:00
William S Fulton
9fb996b83f
Consistent spacing in generated exception specifications
2018-05-06 09:46:37 +01:00
William S Fulton
589b7237e9
Tweak Perl's director method's $result variable generation.
...
Use same code as other languages - no real change in output.
2017-12-19 07:49:16 +00:00
William S Fulton
717b7866d4
Perl - Add support for missing directorfree typemaps
...
Related to issue #1167 , to free up memory when returning reference types.
SWIG_Perl_AcquirePtr still needs implementing.
2017-12-14 07:51:45 +00:00
William S Fulton
ae044c1c2f
Generation of director method declarations fixes
...
- Fixes generation of director method declarations containing C++11 ref-qualifiers.
- Fixes generation of director method declarations returning more complex types such
as const ref pointers.
- Rewrite Swig_method_call to use more up to date code in the core.
2017-10-23 18:55:14 +01:00
William S Fulton
3f8b8fe734
Enhancements for directorin typemaps
...
The directorin typemaps will now generate a temporary variable
(specified after the type), such as:
%typemap(directorin) MyType (MyType *temp) { ... use temp ... }
The shared_ptr director typemaps have been fixed for use in functions
that take more than one parameter.
2017-10-16 19:28:27 +01:00
William S Fulton
ebd37155a8
Fix potential use of uninitialized variables in directors
2017-05-13 22:40:59 +01:00
Christophe Duvernois
4777a0ad3c
#526 : propagate c++11 noexcept to director classes
2017-04-27 23:37:15 +02:00
William S Fulton
7ead141aa9
Fix unused variable warning in Perl wrappers
2016-05-28 00:45:24 +01:00
Petre Eftime
0a07cd4c30
Prevent redefinition warnings when compiling with SWIG<module> defined
...
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
2015-12-22 14:33:21 +02:00
William S Fulton
457e0bfa81
Typemap attribute fixes
...
Fix for breakages in previous few commits:
- Perl test-suite - the "varout" typemap "type" attribute is now
expanded in typemap.c instead of Perl.cxx.
- The swig_typemap_warn errors testcase showed that $1 was no longer
being expanded correctly when used in output typemaps (lname not set).
2015-07-24 00:32:46 +01:00
William S Fulton
d64c241e1c
gcc-5.1 warning fixes
2015-04-26 01:18:26 +01:00
Olly Betts
01d0ee86e0
Fix C&P references to Python in comments
2015-03-27 12:40:42 +13:00
Olly Betts
7ba0652677
Create director_common.swg for language-indep code
...
Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for
all languages with director support, not just Python and PHP.
2015-03-12 19:51:11 +13:00
William S Fulton
760d603918
Warning and error fixes for Solaris Sun Studio compiler
2015-01-27 19:30:24 +00:00
William S Fulton
6029b2f7d8
Fix for 'self' being used as a parameter name
2014-10-30 07:22:59 +00:00
Robert Stone
488aed4224
apply SF Patch #350 and add testcase
2014-08-15 21:47:10 -07:00
Olly Betts
36be36d618
Eliminate needless casting away const from string constants
2014-04-30 12:00:23 +12:00
William S Fulton
279ebdc0cf
Beautify director output
2013-12-23 18:21:52 +00:00
Robert Stone
43aefba9ee
ran "beautify-file" make target over perl5.cxx patch hunks and rewrote callback and extend examples in the style of existing examples
2013-11-14 09:22:23 -08:00
Robert Stone
e0789366e7
prefer polymorphism on existing destructor over custom destructor method
2013-11-14 08:23:46 -08:00
Robert Stone
055cbc85de
fix string mangled by tidy
2013-11-13 15:04:18 -08:00
Robert Stone
7d80d9b59e
eliminate dead director code and convert remaining blocks
2013-11-13 13:30:54 -08:00
Robert Stone
0901a3e867
steals python directors and adapts to perl5
2013-11-12 12:45:03 -08:00
Sylvestre Ledru
e0b14786d6
Fix some useless code detected by scan-build (LLVM/Clang)
2013-03-08 20:53:18 +00:00
William S Fulton
7841a0d097
Remove cvs/svn Id strings
2013-01-12 01:21:16 +00:00
William S Fulton
092e2104c7
More consistent use of DOH namespace
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13940 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-26 20:31:54 +00:00
William S Fulton
2b8bfe410e
Remove unnecessary null checks or fix potential null dereferences
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-20 23:29:35 +00:00
William S Fulton
d14a88a6bd
Fix memory leak
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13908 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:40:31 +00:00
William S Fulton
5a1e82a2f4
Remove DohClose (Close) and replace with calls to DohDelete (Delete) to fix some minor memory leaks in most uses of NewFile.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:07 +00:00
William S Fulton
7b58300cbd
Fix display of pointers on 64 bit systems, only 32 bit values were being shown.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-21 22:52:30 +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
b69b793d8e
Better consistency in usage display
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 21:42:38 +00:00
William S Fulton
95a3eb5a7d
code style: fix inconsistent NULL pointer comparisons
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12137 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-17 23:49:12 +00:00
William S Fulton
e81bfb86c0
Correct file and line number display for some error messages, these now also result in exiting with an error.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-13 23:08:02 +00:00
William S Fulton
1253657bb4
Add improved namespace support - the nspace feature, working for Java only at the moment.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 21:27:23 +00:00
William S Fulton
cb64f65bae
SWIG license change - Source moves to GPLv3
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:53:33 +00:00
Olly Betts
c1399658ff
[Perl] Don't specify Perl prototype "()" for a constructor with a
...
different name to the class, as such constructors can still take
parameters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11397 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-15 07:43:16 +00:00
William S Fulton
efa11dee52
add new %begin directive for inserting code at top of wrapper file
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11133 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-02-20 07:52:24 +00:00
William S Fulton
ff62288c37
Fix segfault when using -perl -v
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11070 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-15 07:29:28 +00:00
Olly Betts
79f7900968
Mark SWIGPERL5, SWIGPHP5, and SWIGTCL8 as deprecated in the source
...
code and remove documentation of them.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11030 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-05 22:40:07 +00:00
William S Fulton
5ec2d8c166
All languages now define a macro in the generated C/C++ wrapper file indicating which language is being wrapped, eg #define SWIGJAVA
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11018 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-30 00:38:34 +00:00
William S Fulton
cc522323d7
create a common banner header for all target language specific files
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11016 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-29 22:56:25 +00:00
William S Fulton
533ccb5097
deprecate use of include path to find the input file for behaviour that is compatible with other compilers and interopability for ccache
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-22 12:29:41 +00:00
William S Fulton
6fb0f48935
customised ccache support: read the CCACHE_OUTFILES env variable and if exists, the names of all generated files are written to the filename specified in the env variable
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-03 12:51:45 +00:00
Robert Stone
2ee3d98d79
rollback 10737:10749, this work is better left on a branch until it is
...
in support a significant feature enhancement.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10794 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-08-19 07:09:29 +00:00