Commit graph

108 commits

Author SHA1 Message Date
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
Matthias Köppe
d2c89013a2 Don't try to do magic with the (Swig swigrun) module in -runtime mode.
Move SWIG_Guile_Init in front of type registration, to allow type
system synchronization.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6066 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-24 15:19:20 +00:00
Matthias Köppe
7be172dc68 Don't depend on the presence of the SWIG-PointerAddress function.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6065 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-24 15:17:15 +00:00
Matthias Köppe
f6fc431e6c Add extern "C" to declaration of scm_init_Swig_swigrun_module.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6028 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-11 17:10:41 +00:00
Matthias Köppe
2593d326f6 04/24/2004: mkoeppe (Matthias Koeppe)
[Guile] New runtime functions SWIG_PointerAddress,
	    SWIG_PointerType, SWIG_IsPointerOfType, SWIG_IsPointer.

	    [Guile] In -scm mode, wrap several SWIG runtime functions
	    and export them into the module (Swig swigrun).  The
	    runtime module is now built with "module" linkage.

	    [Guile] GOOPS proxy objects now also print the pointer
	    address of the C object.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5912 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-17 15:47:45 +00:00
Matthias Köppe
187286ab8c Use the new common runtime function SWIG_TypePrettyName.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5902 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-06 09:55:32 +00:00
Matthias Köppe
2eacba6ef9 New common runtime function SWIG_TypePrettyName.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5901 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-06 09:51:37 +00:00
Matthias Köppe
9b4f0793de The typemap for FILE * in ports.i now also accepts a regular FILE *
pointer object.  Also a bug with Scheme file ports that are open for
input and output has been fixed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-26 14:09:02 +00:00
Matthias Köppe
4280b31589 In -gh mode, fix the "too many initializers" error
which was caused by an incompatible swig_type_info layout.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5888 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-26 14:08:27 +00:00
Matthias Köppe
e3635aed11 In -scm mode, don't forget to check the type of string arguments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-02 12:58:00 +00:00
Matthias Köppe
7fbaa3b633 Don't try to invoke a null destructor function.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-22 15:28:03 +00:00
Dave Beazley
09d0af6fea Added pack/unpack functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5502 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-08 18:07:36 +00:00
Matthias Köppe
297b943f2e Rename the three smob types to "swig-pointer",
"collectable-swig-pointer", "destroyed-swig-pointer", so that the
automatically generated class metaobjects <swig-pointer> etc. do not
contain whitespace (which prints stranegly as a symbol) and do not
clash with the <swig> class metaobject of the GOOPS wrapper.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5394 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-25 17:03:59 +00:00
Matthias Köppe
128784c26a (SWIG_Guile_NewPointerObj): Return '() to represent null pointers.
This is for compatibility with the -gh version.
Also, GOOPS objects representing null pointers would behave very
badly, like segfaulting when one DESCRIBEs them.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5383 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-24 16:55:22 +00:00
Matthias Köppe
894d9cc4e9 Add a SWIG_contract_assert macro.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5379 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-23 20:29:07 +00:00
Matthias Köppe
2d7af13dd6 In -gh mode, don't forget to call SWIG_Guile_Init.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5376 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-23 18:47:20 +00:00
Luigi Ballabio
5e161fa7cd Char and unsigned-char specialization added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-19 08:38:27 +00:00