Commit graph

4,854 commits

Author SHA1 Message Date
William S Fulton
75d5b64fa1 enum_thorough, more comprehensive enum testing
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5855 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 20:02:37 +00:00
William S Fulton
cd62640ebe _a -> m_a name change
_a member variable clashes with get_a() for languages that use getter and setter methods for member variables


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5854 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 20:01:43 +00:00
William S Fulton
fcda6ee313 Some hints for debugging DOH types added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5853 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:57:35 +00:00
William S Fulton
b725de3aca Typemap changes for C# enums.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:43:26 +00:00
William S Fulton
5b0ea529f9 C++ enums are no longer wrapped by integers, they are now wrapped by C# enums.
For Example, given C++:

                enum AnEnum { foo, bar };
                typedef AnEnum AnEnumeration;
                void something(AnEnum e, AnEnumeration f);

            The following is generated:

                public enum AnEnum {
                  foo,
                  bar
                }
                public static void something(AnEnum e, AnEnum f) {...}

See the changes file for further details


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5851 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:41:40 +00:00
William S Fulton
152a5661a4 Mods for enumvalue being split into enumvalue and enumvalueex.
enumvalue contains the enum value for an enum item (if one given/parsed)
enumvalueex fills in the missing enum values, eg enumvalueex is set to 0 if no enum value given for the first enum item,
otherwise, contains the previous enum value + 1.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5850 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:37:33 +00:00
William S Fulton
374b5b7b44 Fix enums in the type system
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:34:00 +00:00
William S Fulton
678139bb95 enum support function for looking up the enum node from the symbol table given any enum string type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5848 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:33:05 +00:00
William S Fulton
c369bc25ef mods for adding enums to the symbol table
enumvalue split into enumvalue and enumvalueex


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:28:16 +00:00
William S Fulton
1e5687070e Comments on the symbol table added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:23:01 +00:00
William S Fulton
ef291371d5 enum fixes for the typesystem
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5845 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:22:01 +00:00
Henning Thielemann
c146a39d2e fixed NIL pointer problem for 'generaterename', nameToModula3 creates capitals after digits
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-08 16:05:57 +00:00
Henning Thielemann
906c610708 support for (void *)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5843 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-08 16:03:50 +00:00
Marcelo Matus
f4d82c2d62 more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-07 03:32:41 +00:00
Marcelo Matus
7ac0a7f883 accept None in std::vector<A*>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5841 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-07 01:20:41 +00:00
Marcelo Matus
427c969c60 fix std::vector<A*>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-07 00:55:15 +00:00
Marcelo Matus
c4b9434b15 add test for std::vector<A*>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-07 00:53:48 +00:00
Marcelo Matus
99a5a6ae1f fix for CC Sgi
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5838 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 07:58:08 +00:00
Marcelo Matus
51c3be3e75 added primitive_types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:32:55 +00:00
Marcelo Matus
7de77b0bc3 testing wchar_t
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5836 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:32:27 +00:00
Marcelo Matus
8a2343f31d added wchar_t type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5835 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:31:24 +00:00
Marcelo Matus
de65a09e6c fix tp_del field
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:28:07 +00:00
Marcelo Matus
abdf9b7980 fix more comp. warns
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 00:10:14 +00:00
Marcelo Matus
6abaf3fdb9 more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 23:26:20 +00:00
Marcelo Matus
5ddf147312 fix vector<bool> problems
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5831 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 23:24:39 +00:00
Marcelo Matus
f3641c8520 suppress compiler warns and more cosmetics
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 20:20:36 +00:00
Marcelo Matus
c2e704374f add wstring/wchar_t support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5829 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 20:12:02 +00:00
Marcelo Matus
a690d5bed9 add test for wstring
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 20:08:55 +00:00
Marcelo Matus
4e64b1e7be fix array + typedef
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-03 08:45:22 +00:00
Marcelo Matus
70e2cbd5a6 move simple template test outside
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5826 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-03 08:41:41 +00:00
Marcelo Matus
4220781986 more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5825 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-03 08:38:12 +00:00
Marcelo Matus
6e14117b0b more fixes for pointer
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5824 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-03 08:36:08 +00:00
Marcelo Matus
158e4d03d7 added the now explicitly needed macro:
#define SWIG_STD_EXTEND_COMPARISON

note: you don't need this one for most of the cases


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5823 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-02 02:44:34 +00:00
Marcelo Matus
377221f947 we better disable the comparison method generation by default.
reasons:

- before they were not generated, so, nobody will miss them,
  and still they can be activated back using SWIG_STD_EXTEND_COMPARISON,

- the performance penalty is quite visible, and the solution is not
  general, ie, for user types, still they need to be generated by hand.


Marcelo


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-02 02:34:19 +00:00
William S Fulton
c919e3a01c Fixes to compile under VC++ 6:
enum block_type needs to be public
can't use any + operators on enums


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5821 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 20:42:30 +00:00
Marcelo Matus
7cbe501f13 fix pair for ptrs, and add SWIG_STD_NOEXTEND_COMPARISON to reduce swig times
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5820 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 18:51:30 +00:00
Marcelo Matus
ffd76a5b4e add ptr cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5819 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 18:49:22 +00:00
Henning Thielemann
1cca8352ef made enum block_type a protected member of class MODULA3, hope that VC++ 6 is satisfied with that
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5818 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 15:49:16 +00:00
Marcelo Matus
e6d14ad72c added more especial methods for python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5817 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 05:12:23 +00:00
Marcelo Matus
74f9ade9f7 more cases
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5816 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 04:08:18 +00:00
Marcelo Matus
5822020fc7 added support for const, like std::pair<const int, int>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 04:07:27 +00:00
Marcelo Matus
ecff58b6bb fix casting type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 03:58:47 +00:00
Marcelo Matus
90c7eeb3ee more safer memcpy use
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5813 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 11:57:02 +00:00
Marcelo Matus
beb0eebd14 replace explicit static_cast<T>(v) with old style (T)v, just in case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5812 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 11:45:45 +00:00
Marcelo Matus
facee0d359 slightly better support for template const/dest and features
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 11:29:54 +00:00
Marcelo Matus
705b2d863c - better support for classes with no default constructor, equal or
comparison methods.

  you will be able to do

    struct Foo {
     Foo(int) {}
    };

    %std_nodefconst_type(Foo); // Says Foo has no def. constructor

    %template(vector_Foo) std::vector<Foo>;

  and the conflicting vector/list/deque methods will not be generated.


more cosmetic, and a note about the relation between std::map and
std::pair.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5810 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 11:27:53 +00:00
Marcelo Matus
2ecbbbf107 moving the 'unnamed' macros outside swig.swg, for better mantainance
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5809 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 04:18:11 +00:00
Marcelo Matus
074a88fd37 added compiler case without unnamed template param. support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5808 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 03:36:59 +00:00
Marcelo Matus
424c7a78e3 forgot inline
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5807 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 02:29:27 +00:00
Marcelo Matus
a941c34524 added support for unnamed C++ enum members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5806 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 02:09:55 +00:00