Commit graph

370 commits

Author SHA1 Message Date
Marcelo Matus
a04dc64d04 fixes for const char[]
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5931 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-27 11:29:39 +00:00
Ahmon Dancy
9edaaf5a7d See CHANGES.recent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5928 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 21:22:39 +00:00
William S Fulton
5e1804c496 New enum wrapping options implemented and bug fixes:
Proper Java enums
Typesafe enum pattern
Original approach using integers for each enum item
'Type unsafe enums' - using static final integers in a Java class named after the C/C++ enum name


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 20:22:55 +00:00
William S Fulton
3e9b0bde05 New enum wrapping options implemented and bug fixes:
Proper C# enums
Typesafe enum pattern
Original approach using integers for each enum item


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 20:19:36 +00:00
William S Fulton
915454d6ef enumvalueex attribute now set during the type pass
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5923 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 20:14:58 +00:00
Lyle Johnson
410af41cae Incorporated Kou's patch for the Ruby module's %import directive, so
that nested module names are imported correctly.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5908 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-15 04:52:43 +00:00
William S Fulton
9705ff87be patch by Kevin Smith to emit directors when %feature("director") is specified for a class with no virtual methods, but a virtual destructor
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5905 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-12 21:18:09 +00:00
William S Fulton
b4a002dad0 Removed spurious junk so the file compiles
strdup removed - not ANSI and not on my system


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-12 20:56:17 +00:00
Ahmon Dancy
8a7c459cda See CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5900 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-03 17:10:20 +00:00
John Lenz
2a575da398 Fix bug 782468
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-02 21:24:39 +00:00
Ahmon Dancy
fef1a09e5a Added Allegro CL module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-27 23:00:41 +00:00
William S Fulton
594773a7e3 Revert typemaps changes for member variables (and static members and globals for some languages ).
The typemaps were changed to use const ref typemaps (C++ only, not C).
Inconsistency removed and the pointer typemaps used again.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5890 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-26 20:24:18 +00:00
Matthias Köppe
9b711ca7e6 In the generated GOOPS code, don't create methods that would not
specialize any arguments; simply re-export the primitive functions.
(This is a performance optimization which reduces load time and
execution time.)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5886 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-26 14:05:20 +00:00
William S Fulton
18ad5f64b1 %import fix for C# enums
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5884 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-22 20:56:48 +00:00
Marcelo Matus
23ea59435d fix dirprot mode
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-11 12:20:04 +00:00
Marcelo Matus
64c0b01733 error fix in lang.cxx and more comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-11 08:09:57 +00:00
Marcelo Matus
1eba66b31b fix java reg. tests and add -directors flag
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5867 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-11 05:55:35 +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
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
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
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
d990cc031a better support for member vars
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5794 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-28 14:05:53 +00:00
Matthias Köppe
035bb2c955 Constness fix.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 13:15:06 +00:00
Matthias Köppe
e6d686e16f Fix the documentation strings of functions with anonymous arguments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5779 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 11:49:44 +00:00
Henning Thielemann
483d8b4367 added basic Modula-3 support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-19 11:45:29 +00:00
Marcelo Matus
b6119293f3 fix director call for the single container argument case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5768 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 20:32:14 +00:00
Henning Thielemann
a8340335f8 'const' for parameters of addSymbol
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5766 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 19:00:23 +00:00
Henning Thielemann
1a39907bd9 'const' for parameters of addSymbol
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5765 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 18:40:26 +00:00
Marcelo Matus
eae815451e Allowing the empty %template directive, such as
%template() std::vector<int>;

to process the class "typedef"s and "typemap"s. Before
only the internal "typedef"s were processed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:18:17 +00:00
William S Fulton
82c4109a2d Director fix. Some director callback methods were not being called on all operating systems.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5746 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-11 21:26:47 +00:00
William S Fulton
9f9ba96e8e New commandline option -namespace for putting all generated classes into a C# namespace.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-24 21:05:48 +00:00
William S Fulton
e1d89a2cdc Generate package statement after the SWIG banner
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-24 21:03:47 +00:00
Matthias Köppe
61668907c8 Define FUNC_NAME also in the dispatch wrapper for overloaded
functions.  Patch by John Lenz, SF #896255.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-23 13:56:29 +00:00
William S Fulton
43f49bae98 boring warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5727 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-19 21:45:10 +00:00
William S Fulton
3fd2fa5dcc bool patch fix. Needed for NextStep.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5726 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-19 21:44:44 +00:00
Matthias Köppe
aa3f0b2b30 Don't produce invalid C code when invoked with the
-declaremodule option.  Reported by Tim Brown, SF #891108.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5723 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 16:03:24 +00:00
Matthias Köppe
335a2d4621 New command-line argument -init.
We use it for building the runtime library, where we don't want the
functions scheme_initialize et al.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 15:47:55 +00:00
William S Fulton
1236b0bfcb Overloading fixes for when methods cannot be disambiguated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5713 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-12 21:48:55 +00:00
William S Fulton
aed0e94056 Bill Hoffman patch to stop crashing when typewrapper class cannot be created. Overloading fixes for when methods cannot be disambiguated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5712 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-12 21:48:37 +00:00
Matthias Köppe
b661ffa634 Replace the "known_classes" hash table by a node attribute. Methods
of classes in C++ namespaces now get the proper specializer in the
GOOPS declaration.  Reported by rm@mh-freiburg.de.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5709 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 15:26:22 +00:00
Logan Johnson
c28431b42b Omit unused parameter names for C++ code only; this is illegal in C.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-09 23:08:54 +00:00
Logan Johnson
d43a3d22e4 Be sure to initialize all of the fields of a PyMethodDef struct to some
value, to avoid numerous compiler warnings.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-06 17:46:50 +00:00
William S Fulton
11ed0bc80b fix classLookup() to return consistent results when %ignore specified
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-03 21:19:19 +00:00
Matthias Köppe
6cf25c39da Fix typos in help text.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5695 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-01 12:01:49 +00:00
Marcelo Matus
2f9749cb04 cosmetic fix to avoid warnings in the generated code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-28 01:47:19 +00:00
Marcelo Matus
9b4df57aa4 Simple patch to allow fragments to include other fragments:
%fragment("Hello","header") "..."

%fragment("Hi","header",fragment="Hello") "..."

the latter fragment will include the first one if is invoked.

more than one fragment can be included at the time, just
keep adding fragment="f1",fragment="f2", etc.

this is used to emulate typemaps reuse, where all the
reusable typemap code is put in a fragment static method,
and then it can be included from another fragment typemap
as needed.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-27 23:39:35 +00:00
Marcelo Matus
8a9803addf fix memory leak with director and NewPointerObjects
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5688 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-26 10:20:06 +00:00