Commit graph

124 commits

Author SHA1 Message Date
William S Fulton
2535297efb minor formatting change
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11995 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-23 06:44:47 +00:00
William S Fulton
bdb136d611 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&.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-04-01 18:26:37 +00:00
William S Fulton
4308dd03cf 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.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:26:02 +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
a91e4906b5 Add newmemory parameter for SWIG_TypeCast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-10 00:35:11 +00:00
John Lenz
b8629b298c Fix list_vector.i in the guilescm test suite to work on amd64
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10069 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-29 02:12:13 +00:00
Matthias Köppe
c102472282 Another fix for test case apply_strings, for guile -gh, by adding explicit casts to the appropriate .
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10026 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-23 00:11:16 +00:00
Matthias Köppe
e6a07ee55b Fix testcases apply_signed_char and apply_strings by adding explicit casts to the appropriate .
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10022 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-22 21:49:36 +00:00
Olly Betts
c836c81acb When wrapping C++ code, generate code which uses
std::string::assign(PTR, LEN) rather than assigning
std::string(PTR, LEN).  Using assign generates more efficient code
(tested with GCC 4.1.2).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-17 20:10:57 +00:00
John Lenz
206e5c64af Patch from Chris Shoemaker to clean up some warnings in the guile module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9492 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-30 04:44:46 +00:00
John Lenz
56904f30d0 - Fix SF bug 1573892
- Minor change to chicken to make it work with version 2.5rc1
- add externaltest to chicken and guile modules


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9451 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-14 08:19:27 +00:00
Luigi Ballabio
2ba3707828 Fixes for std::pair typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9230 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-01 07:51:45 +00:00
William S Fulton
389b4813ca more %apply char* fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9093 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-05 23:26:57 +00:00
William S Fulton
2d24918a97 ensure %apply with char*, unsigned char* and signed char* works
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9072 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-03 20:58:19 +00:00
William S Fulton
49be05f4fd 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@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 00:14:10 +00:00
Matthias Köppe
6cbd9a9b3c [Guile -scm] Add typemaps for "long long"; whether the generated code
compiles, however, depends on the version and configuration of Guile.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-03 04:00:31 +00:00
Matthias Köppe
b63f275984 [MzScheme] Typemaps for all integral types now accept the full range
of integral values, and they signal an error when a value outside the
valid range is passed.

[Guile] Typemaps for all integral types now signal an error when a
value outside the valid range is passed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-19 19:28:42 +00:00
Matthias Köppe
06dc2432b7 (free_swig_member_function): Add missing return.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8656 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-31 02:45:48 +00:00
Matthias Köppe
dadce146a2 Add some more std::string typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-30 19:01:35 +00:00
William S Fulton
fdd16d7234 std::string global and member variables are wrapped as strings by default
No need to use the %apply const std::string& { std::string* } trick anymore


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 21:21:47 +00:00
Matthias Köppe
6ba7c1600b Define and use %argument_fail, %as_voidptr.
Use SWIG_IsOK, SWIG_CheckState.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 20:36:57 +00:00
Matthias Köppe
985a5928d4 (SWIG_Guile_ConvertPtr): Use constants SWIG_OK, SWIG_ERROR.
(SWIG_Guile_MustGetPtr): Use SWIG_IsOK macro.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 20:35:52 +00:00
Matthias Köppe
edba3add6b Add support for member function pointers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-29 18:47:18 +00:00
William S Fulton
b83ac2646b Fix for typedef to void *
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8529 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-23 21:47:16 +00:00
William S Fulton
5ea4b63548 Resort back to SWIG-1.3.27 STL exception handling. The generic std_except.i does not work due to some problem with SWIG_exception
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8306 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 21:21:24 +00:00
William S Fulton
2387c32254 Each target language now has its own std_deque.i like the other STL wrappers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 20:08:44 +00:00
Marcelo Matus
69c14f087e add initial stl.i to ensure proper file inclussion and extensions for each language
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8232 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 00:37:31 +00:00
William S Fulton
cfdad24993 Use the system angle brackets for %include
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-26 09:28:20 +00:00
Matthias Köppe
b29ce687b3 Fix last change, add throw typemap for enums.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-26 21:46:23 +00:00
Matthias Köppe
8e61ee737c Added throw typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7531 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-25 21:36:01 +00:00
William S Fulton
03a67698a9 use exception specification instead of %exception to handle STL error checking
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7352 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-07-27 20:09:42 +00:00
Matthias Köppe
47f0f21ebf Fix handling of anonymous-enum variables.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7276 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-11 16:36:46 +00:00
Matthias Köppe
6edd2e4561 Fix for global "const char *" variables.
Fix testcases arrays_dimensionless, arrays_global.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7272 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-10 11:43:46 +00:00
Matthias Köppe
c0c0689298 Fix typecheck for SWIGTYPE.
This fixes the following bug:

Luigi Ballabio wrote:

> The following interface produces Guile wrappers which
> do not compile:
>
> %module Foo
> class Foo {};
> class Bar : public Foo {};
> void baz(Foo f);
>
> The reason seems to be the function baz() taking a Foo by value, which
> causes functions to be emitted in the CONVERSIONS section such as:
>
> static void *_BarTo_Foo(void *x) {
>      return (void *)((Foo)  ((Bar) x));
> }
> static void *_p_BarTo_p_Foo(void *x) {
>      return (void *)((Foo *)  ((Bar *) x));
> }
>
> of which the former doesn't compile; on the other hand, only the second
> function is emitted if baz() takes a Foo by const reference.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7266 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-10 10:31:18 +00:00
William S Fulton
815355b964 Uniform handling of SWIGEXPORT across SWIG.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7234 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-27 22:40:58 +00:00
William S Fulton
4c4e3f47ad added missing constructors for std::pair
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7221 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-25 21:34:39 +00:00
Marcelo Matus
e38ce2b2c3 more warning fixes, cosmetics, and uniformity changes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-26 08:47:17 +00:00
Matthias Köppe
05a6e3b6da Remove %apply for size_t; add %typecheck for size_t and ptrdiff_t
directly.  This fixes warnings in test case wrapmacro.

Add %typecheck for SWIGTYPE.  This fixes warnings in test cases
director_basic, extend_placement, overload_template,
template_default_arg, valuewrapper_opaque.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-13 12:30:39 +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
93618727bb Cast guile enum in typemap corretly
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-01-24 03:01:09 +00:00
Marcelo Matus
811c159e38 allow to include the swig runtime code into external user libraries
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6752 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-18 00:37:33 +00:00
John Lenz
c65f985bc6 Revert guile_gh.swg and guile_gh_run.swg to not use new runtime system.
Added global variable to hold status of -runtime,-c,-noruntime flag for use
  in guile gh module mode.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6630 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 22:06:53 +00:00
William S Fulton
a87c96ec8e size_t fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6581 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 21:12:01 +00:00
John Lenz
0c57969c61 - Add SWIG_RUNTIME_VERSION to new type sharing code. This is for future-proof, if
the format of swig_type_info ever changes, this number should be incremented
- Add SWIG_LINK_RUNTIME and SWIG_STATIC_RUNTIME symbols to python
- Convert inline into SWIGINLINE


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 21:53:54 +00:00
William S Fulton
85b1bcfc47 removed redundant valuewrapper feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6459 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-20 21:19:14 +00:00
Marcelo Matus
5a4369fd11 avoid to use SwigValueWrapper with std::string, just to keep the code cleaner and familiar
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:35:16 +00:00
John Lenz
75e462baa8 Removed ability to share type information by C linking
All type sharing happens through a global variable in the target language.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 18:23:59 +00:00
John Lenz
143bfb2a62 Fix a few bugs in the tcl module related to clientdata propagation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6357 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-07 02:31:14 +00:00
Matthias Köppe
18fb19afc1 Move the magic with the (Swig swigrun) module here.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6068 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-24 15:21:17 +00:00
Matthias Köppe
7f6cabe172 In -scm mode, SWIG modules now exchange their pointer type information
via the Guile interpreter.  It is no longer necessary to build a
runtime library or to use -noruntime and -runtime etc.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6067 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-24 15:20:05 +00:00