William S Fulton
46f7501d94
Cleanup SWIG_VERSION definition
...
Add Swig_obligatory_macros which must be called by each
target language to define SWIG_VERSION correctly
in the generated code, as well as the language specific
macro SWIGXXX where XXX is the target language name.
Drop the #ifdef SWIGXXX that was previously generated -
I can't see the point of this and if users are defining
this macro somehow, then users will need to change this
Closes #1050
2022-10-13 19:47:43 +01:00
Olly Betts
631b41ae7b
Use https for swig.org links
2022-10-06 13:16:39 +13:00
William S Fulton
6939d91e4c
Header file tidyup
...
Fix Visual C++ warning in scilab.cxx:
warning C4996: 'strtok': This function or variable may be unsafe.
2022-05-07 11:56:06 +01:00
Olly Betts
55377bdc08
Add DOH Exit() and SetExitHandler()
...
Exit() is a wrapper for exit() by default, but SetExitHandler() allows
specifying a function to call instead.
This means that failures within DOH (e.g. Malloc() failing due to lack
of memory) will now perform cleanup such as removing output files.
This commit also cleans up exit statuses so SWIG should now reliably
exit with status 0 if the run was successful and status 1 if there was
an error (or a warning and -Werror was in effect).
Previously in some situations SWIG would try to exit with the status set
to the number of errors encountered, but that's problematic - for
example if there were 256 errors this would result in exit status 0 on
most platforms. Also some error statuses have special meanings e.g.
those defined by <sysexits.h>.
Also SWIG/Javascript tried to exit with status -1 in a few places (which
typically results in exit status 255).
2022-03-06 12:33:54 +13:00
Olly Betts
9ddc9dceb7
Remove support for $source and $target
...
These were officially deprecated in 2001, and attempts to use them have
resulted in a warning (including a pointer to what to update them to)
for most if not all of that time.
Fixes #1984
2021-04-30 10:20:14 +12:00
Olly Betts
0bf846f56f
Eliminate unused Printf args
2021-04-13 10:43:51 +12:00
William S Fulton
b58995c89e
$arg and $input were incorrectly substituted in the argout typemap
...
when two or more arguments were present.
Closes #1559
2019-06-28 08:09:47 +01:00
William S Fulton
c7ff070cd7
MzScheme - add missing return
2019-02-10 10:40:07 +00:00
William S Fulton
a2db2a6e27
Format mzscheme help output
...
Also simplify -dynamic-load option help as it does more than
not emit scheme_initialize, scheme_reload, scheme_module_name.
2019-02-09 17:34:02 +00:00
William S Fulton
20344093ef
Fix mzscheme static variable wrappers
...
$argnum needs to be expanded in the 'varin' typemap which shares
code used by the 'in' typemap.
Setting the static variable is also a function call (argnum=1).
Added class examples - needs static variables to work
Test newly working test cases with this fix
2019-02-09 14:44:33 +00:00
William S Fulton
b21a28f26a
MzScheme missing destructor added in, std_vector example fixed
2019-02-09 14:44:33 +00:00
luz.paz
60dfa31a67
Misc. typos
...
found via `codespell` and `grep`
2018-05-17 10:04:23 -04: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
Olly Betts
36be36d618
Eliminate needless casting away const from string constants
2014-04-30 12:00:23 +12:00
William S Fulton
7841a0d097
Remove cvs/svn Id strings
2013-01-12 01:21:16 +00:00
William S Fulton
6cd247d653
Correct prefix handling - bug introduced in rev 13886
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-12-02 13:37:10 +00:00
William S Fulton
46d2486115
Resource leak fixes (or hiding them from Coverity static analysis tool by using String instead of char *)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13886 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:54 +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
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
William S Fulton
b57a12fa21
Fix for a few affected target languages since last commit changed the way enum values that are type char are handled.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-26 23:25:14 +00:00
William S Fulton
a63d456f8a
Remove redundant code highlighted by warnings in gcc-4.6
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +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
d87c312fd0
Corrections to calls to SwigType_manglestr to use a genuine SwigType
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12320 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-11-29 07:49:42 +00:00
Olly Betts
bf1d3f0714
Remove superfluous semicolons.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-21 07:10:12 +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
William S Fulton
ff1cc536a5
Very minor perf tweak
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-08 18:46:41 +00:00
William S Fulton
83bd820285
Add typemaps used debugging option (-debug-tmused). Fix missing file/line numbers for typemap warnings and in the output from the -debug-tmsearch/-debug-tmused options
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11802 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-04 19:33:52 +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
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
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
William S Fulton
dfcb1640bf
Remove old swig-1.1 Swig_typemap_lookup function. Rename Swig_typemap_lookup_new() to Swig_typemap_lookup()
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10453 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-15 21:18:44 +00:00
William S Fulton
336b50b43d
Add the optimal attribute to the out typemap for more optimal code generation when returning objects by value
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-14 22:12:31 +00:00
William S Fulton
2bef4d6b0c
Set wrap:name for variables for use in special variable
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10270 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-27 15:29:55 +00:00
William S Fulton
fe042d2ebc
Replace cvs $Header$ with svn $Id$
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:42:11 +00:00
John Lenz
fb51964d01
Fix a bunch of minor bugs found by Coverity scanner
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-10 02:55:27 +00:00
William S Fulton
aa04c4c057
beautify/format source code with gnu indent
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-01 23:54:54 +00:00
Olly Betts
93d3c4b6d2
Use the DOH String instead of a static char array.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9297 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-19 18:13:53 +00:00
Hans Oesterholt-Dijkema
b593492d03
* mzscheme code can now dynamically load libraries, that are needed
...
at runtime. This allows for code to be generated at some site, and
distributed without the need for SWIG.
The distribution needs only the header filesfor which the code has been
generated. Linking is done at runtime, by loading the dynamic libraries.
Functions are resolved when needed.
Though somewhat inefficient, it provides for a way to distribute code
or binaries that are independent of the version of the installed libraries,
which comes in especially handy for e.g. binding against Gtk.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9211 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-09 17:10:05 +00:00
William S Fulton
d9d1a7d5c4
ensure $symname is suitably expanded
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-05 21:26:10 +00:00
William S Fulton
7f74b8e7a3
Common template for head of each file detailing licence, distribution and authors information
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8972 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-06 22:51:01 +00:00
Marcelo Matus
3b866d286b
implement the 'allowexcept' feature for global variables
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8576 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-28 02:36:13 +00:00
William S Fulton
09444a7208
Fix for constants attempting to generate setters with %feature(immutable,"0")
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-15 01:14:21 +00:00
William S Fulton
32839df23b
Modify following features to work as flags, so that they can be truely set and unset:
...
immutable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7566 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-30 23:01:13 +00:00
William S Fulton
656cb7ab06
Modify following features to work as flags, so that they can be truely set and unset:
...
new
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-30 22:10:17 +00:00
William S Fulton
bed81d66d3
Better error message displayed when file cannot be opened
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-08 22:31:21 +00:00
John Lenz
67b49825cb
Add support for the -external-runtime argument and update all language modules to use it
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6993 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-23 22:40:51 +00:00
William S Fulton
f149a9f3d1
swig -help prints to stdout not stderr now
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6964 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 23:04:10 +00:00
John Lenz
c3338b1a16
- Improve the runtime type sytesm
...
- Update all languages to new type system
- Add DohSortList function
- Fix mzscheme Examples/Makefile
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-01 00:08:24 +00:00
John Lenz
6ed2f7e90e
New way of sharing type information between modules for chicken, mzscheme,
...
ruby, tcl, and perl.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6332 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 22:43:41 +00:00