Commit graph

1,055 commits

Author SHA1 Message Date
William S Fulton
1472f009ea Fix enums in the type system
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5849 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:34:00 +00:00
William S Fulton
d19287dc1f 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/SWIG@5848 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:33:05 +00:00
William S Fulton
9e495501fd 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/SWIG@5847 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:28:16 +00:00
William S Fulton
4a31a07a5b Comments on the symbol table added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5846 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:23:01 +00:00
William S Fulton
81a2cab015 enum fixes for the typesystem
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5845 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:22:01 +00:00
Henning Thielemann
36a1080825 fixed NIL pointer problem for 'generaterename', nameToModula3 creates capitals after digits
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-08 16:05:57 +00:00
Marcelo Matus
3c0fe7cae7 fix array + typedef
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-03 08:45:22 +00:00
William S Fulton
87df1f880e 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/SWIG@5821 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 20:42:30 +00:00
Henning Thielemann
92dbf178bc 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/SWIG@5818 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 15:49:16 +00:00
Marcelo Matus
be560544f5 fix casting type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-01 03:58:47 +00:00
Marcelo Matus
e7f9a34649 slightly better support for template const/dest and features
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 11:29:54 +00:00
Marcelo Matus
e00522f427 added support for unnamed C++ enum members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5805 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-31 01:35:44 +00:00
Marcelo Matus
e74ce651ca better support for member vars
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5794 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-28 14:05:53 +00:00
Marcelo Matus
2e50998bd0 fixes some compiler warnings, and add better support
for member variables (in C++/python).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5793 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-28 14:04:36 +00:00
Marcelo Matus
f958140af5 simpler mangling method
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5791 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-23 01:47:54 +00:00
Marcelo Matus
a27e364d14 Using the same mangling method whenever is needed.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5786 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-23 00:59:26 +00:00
Matthias Köppe
61a83837cd Constness fix.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 13:15:06 +00:00
Matthias Köppe
59bae5cdef Fix the documentation strings of functions with anonymous arguments.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5779 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 11:49:44 +00:00
Henning Thielemann
39d92e49b2 added basic Modula-3 support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-19 11:45:29 +00:00
Marcelo Matus
b6ec9bd449 add missing Swig_typedef_resolve_all
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5769 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 20:35:15 +00:00
Marcelo Matus
c55acbc20f fix director call for the single container argument case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5768 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 20:32:14 +00:00
Henning Thielemann
b6cf16db6d 'const' for parameters of addSymbol
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5766 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 19:00:23 +00:00
Henning Thielemann
a5a254d7fa 'const' for parameters of addSymbol
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5765 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-18 18:40:26 +00:00
Marcelo Matus
e0adc5af01 Fragments can now be "type especialized", as the typemaps. The
syntax is as follows

 %fragment("name","header") { /* an old fragment */ }
 %fragment("name" {Type}, "header") { /* the fragment is type dependent */}

Now fragments can also be used inside templates:

 template <class T>
 struct A {
   %fragment("incode"{A<T>},"header") {
     /* 'incode' especialized fragment */
   }

   %typemap(in,fragment="incode"{A<T>}) {
     /*
       here we use the 'type especialized' fragment
       "incode"{A<T> }
      */
   }
 };


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:36:06 +00:00
Marcelo Matus
a8d60a0058 Added the #@ mangling extension
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5752 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:32:11 +00:00
Marcelo Matus
a95c468076 Using the unused 'Swig_string_mangle' method to
implement the #@ preprocessor mangling


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5751 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:27:02 +00:00
Marcelo Matus
cf8a1c311c 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/SWIG@5750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:18:17 +00:00
Marcelo Matus
6184dceb5b Fragments can now be "type especialized", as the typemaps. The
syntax is as follows

 %fragment("name","header") { /* an old fragment */ }
 %fragment("name" {Type}, "header") { /* the fragment is type dependent */}

Now fragments can also be used inside templates:

 template <class T>
 struct A {
   %fragment("incode"{A<T>},"header") {
     /* 'incode' especialized fragment */
   }

   %typemap(in,fragment="incode"{A<T>}) {
     /*
       here we use the 'type especialized' fragment
       "incode"{A<T> }
      */
   }
 };

Also, there is a minor templ.c fix when expanding '#T'.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5749 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:01:06 +00:00
William S Fulton
9491429860 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/SWIG@5746 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-11 21:26:47 +00:00
William S Fulton
173a25a6fd New commandline option -namespace for putting all generated classes into a C# namespace.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-24 21:05:48 +00:00
William S Fulton
f306061b04 Generate package statement after the SWIG banner
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5738 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-24 21:03:47 +00:00
Matthias Köppe
30d9c11393 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/SWIG@5736 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-23 13:56:29 +00:00
William S Fulton
06b079936c bool patch code removal
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5729 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-20 22:52:49 +00:00
William S Fulton
6516029372 Fixes for compilation by the Digital Mars Compiler. Submitted by Scott Michel.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-20 22:51:47 +00:00
William S Fulton
73d0efa0d8 boring warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5727 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-19 21:45:10 +00:00
William S Fulton
ef24de36fb bool patch fix. Needed for NextStep.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5726 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-19 21:44:44 +00:00
Matthias Köppe
e2d254b686 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/SWIG@5723 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 16:03:24 +00:00
Matthias Köppe
994a002fdb 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/SWIG@5720 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 15:47:55 +00:00
Dave Beazley
a1ef09aa22 Removed 'bool' datatype. Not portable. Please don't use.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5719 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-13 00:20:12 +00:00
William S Fulton
72618a43fb Overloading fixes for when methods cannot be disambiguated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5713 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-12 21:48:55 +00:00
William S Fulton
ad5d600aeb 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/SWIG@5712 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-12 21:48:37 +00:00
Matthias Köppe
e863eb01d6 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/SWIG@5709 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 15:26:22 +00:00
Marcelo Matus
7fef280ae0 Added the ref/unref 'recursive' featues. See refcount.i for details
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5705 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 09:21:36 +00:00
Marcelo Matus
2a573e9a08 Keep the old non-resolved type str and add the fully
resolved one if is needed.

Add examples showing the problem with SWIG_TypeQuery
and template+typedef and the old type str, and how
it works now.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5704 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 08:37:30 +00:00
Marcelo Matus
d3caa4eefc Fixes for SWIG_TypeQuery and templates/typedefs,
before the swig_type_info fields 'str' and 'name'
where not consistent, one was fully resolved (name),
the other not, therefore

  typedef int Int;
  template <class C> struct Class {};

  SWIG_TypeQuery($descriptor(Class<int>*))

wasn't necessary the same that

  typedef int Int;
  template <class C> struct Class {};

  SWIG_TypeQuery("Class<int> *")

the problem was visible only when the latter form was used,
like in a static auxiliar function outside a typemap.

also, relax type name comparison with blanks, ie

  SWIG_TypeQuery("Class<int> *") := SWIG_TypeQuery("Class<int > *")


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5703 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 03:42:38 +00:00
Logan Johnson
8f7e15900e Omit unused parameter names for C++ code only; this is illegal in C.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-09 23:08:54 +00:00
Logan Johnson
acbb784a50 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/SWIG@5701 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-06 17:46:50 +00:00
Logan Johnson
4328d45859 Make sure that all fields of the swig_type_info struct are initialized
to something, to avoid numerous compiler warnings.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-06 17:44:13 +00:00
William S Fulton
f451962c82 fix classLookup() to return consistent results when %ignore specified
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5697 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-03 21:19:19 +00:00
Matthias Köppe
8e7b9d749c Fix typos in help text.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5695 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-01 12:01:49 +00:00