Commit graph

15,579 commits

Author SHA1 Message Date
Leif Middelschulte
dc9f0e5076 Change style of command line snippets to "shell"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13644 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:22:48 +00:00
Leif Middelschulte
0db6a8c201 Change style of C code to "targetlang"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13643 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:22:38 +00:00
Leif Middelschulte
beb9851f04 Add docs about typemaps used by the C backend for proxy code generation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13642 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:22:28 +00:00
Leif Middelschulte
370a7926d8 Use "targetlang" style for C code in docs.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:22:17 +00:00
Leif Middelschulte
b25f28938b Reuse 'ctype' typemap to cast wrapper calls. Reduces number of typemaps for the cost of unnecessary casts (e.g. 'int' to 'int').
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13640 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:22:06 +00:00
Leif Middelschulte
a826cdda4e Add beginning of 'which typemap is for what' for C backend documentation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 17:21:51 +00:00
Leif Middelschulte
1c38df4ceb Correct some descriptions of the typemaps. Remove duplicates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13638 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-17 12:15:08 +00:00
Leif Middelschulte
4da42db22e Remove the std_vector test I've added while trying for testing purposes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13627 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 12:52:29 +00:00
Leif Middelschulte
3b6e37bdf8 Workaround issue with swig casting to wrong (not const) type in wrapper's C++ function call, by setting variables to non const.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 12:48:00 +00:00
Leif Middelschulte
554a3f9e01 Remove copy and pasta (unsigned float and unsigned double typemaps).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 12:47:49 +00:00
Leif Middelschulte
f013b9d044 Add explicit types for 'ctype' typemap because swig does not resolve e.g. std::vector<int>::value_type to 'int' with the $1_ltype approach.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 12:47:39 +00:00
Leif Middelschulte
9cd39cca50 Fix typemaps of char* and equivalents to be explicit about the resolved type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-16 12:47:27 +00:00
Leif Middelschulte
0d472a6cb7 Add constant pointers to 'out' typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:57:11 +00:00
Leif Middelschulte
7e673e7334 Add constant pointers to 'proxycouttype' typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13616 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:56:53 +00:00
Leif Middelschulte
2d18d31bcc Add constant pointers to 'cppouttype' typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13615 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:56:33 +00:00
Leif Middelschulte
971e501546 add const pointers to 'couttype' typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:56:19 +00:00
Leif Middelschulte
b70b752883 Add constant pointers to 'in' typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13613 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:56:03 +00:00
Leif Middelschulte
41b3fcc1b6 Add constant pointers to 'ctype' typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13612 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:55:49 +00:00
Leif Middelschulte
1440b43690 Add constant pointers to 'proxy' typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13611 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:55:36 +00:00
Leif Middelschulte
a540f7199f Refactor 'cppouttype' to be split by type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13610 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:55:22 +00:00
Leif Middelschulte
dddc13377a Move to appropriate segment
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13609 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-15 19:55:06 +00:00
Leif Middelschulte
88ffd102f3 Remove template specific typemaps. Leftover from the change to C# like template handling.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13605 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 16:22:30 +00:00
Leif Middelschulte
f50b903d64 Add wrapper typemap for "int *const &"
Fix proxy type of complex type (SWIGTYPE) references.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13604 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 16:22:02 +00:00
Leif Middelschulte
0dbfbb79ac use correct typemap for wrapper function.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13603 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-13 16:21:36 +00:00
Leif Middelschulte
ed402ceb37 Don't delete variables twice.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13587 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-10 15:43:11 +00:00
Leif Middelschulte
78ccc8f228 Fix wrong headers inclusion
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13586 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-10 14:50:18 +00:00
Leif Middelschulte
c81a3bd5ec Add typecast to silence compiler warnings caused by inheritance.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13585 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-10 14:50:04 +00:00
Leif Middelschulte
8538e6c1db Fix wrong type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13584 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-10 14:49:49 +00:00
Leif Middelschulte
a84787c273 Rename reference to C++ native types from 'atomic' to 'built_in'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-10 14:49:37 +00:00
Leif Middelschulte
56db1d6e4e Add C backend runtime implementation for basic C++ std::vector<int> test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13581 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 20:03:42 +00:00
Leif Middelschulte
c3236edf80 Add basic C++ test for std::vector instantiated with a native type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13580 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 20:03:22 +00:00
Leif Middelschulte
9619d7c618 Remove wrong typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13579 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 20:03:06 +00:00
Leif Middelschulte
333a842277 Type lookup of $1_ltype fails for templates, so use types directly. Add size_t as type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13578 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 20:02:47 +00:00
Leif Middelschulte
d272709899 Add C runtime test for corresponding C++ basic template test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13573 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 13:06:22 +00:00
Leif Middelschulte
2dac491434 Basic C++ test of very simple template class instantiation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13572 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-09 13:06:03 +00:00
Leif Middelschulte
698d1851c3 Add C runtime test for basic C++ template functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13568 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 16:06:56 +00:00
Leif Middelschulte
0a646835d2 Add basic C++ test for template functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13567 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 16:06:37 +00:00
Leif Middelschulte
a95e257fe8 unused variable--
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13566 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 16:06:23 +00:00
Leif Middelschulte
b6d00028bb Remove name_mangle approach. Broke template function names. Should work like classes, etc. based on "nspace" attribute of node, which is for some reason missing for this kind.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13565 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 16:06:09 +00:00
Leif Middelschulte
63b68eaafc Fix partialcheck of C backend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13561 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-08 10:32:59 +00:00
Leif Middelschulte
725c7f395a remove debug printfs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-07 20:30:00 +00:00
Leif Middelschulte
d6641336f8 Initial work for templates. Mostly adopted from C#.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-07 20:18:21 +00:00
Leif Middelschulte
b0318dae69 Add test for 'natural' C++ std::string handling in C (char*).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13482 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-01 12:53:17 +00:00
Leif Middelschulte
0e75ebbc34 Update to reflect changes (additional typemaps) in the C backend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13481 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-01 12:52:17 +00:00
Leif Middelschulte
44f4dd4dc0 Extend test to check dynamic binding of virtual methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13480 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-01 00:51:50 +00:00
Leif Middelschulte
130ae2cb26 Implement basic C++ exception test for C backend.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13479 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-31 21:15:33 +00:00
Leif Middelschulte
ffb2b6b73b Implement basic C++ virtual method test case for C
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13478 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-31 21:08:39 +00:00
Leif Middelschulte
4dc9b5501c Add basic C++ test for virtual methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-31 21:05:16 +00:00
Leif Middelschulte
42681bd01d Fix unnecessary/wrong casts within proxy->wrapper call
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13431 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-30 10:47:37 +00:00
Leif Middelschulte
ea240fdde3 Rename cpp_atomic_* tests to cpp_basic_*
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2012-c@13423 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-07-27 14:05:14 +00:00