Commit graph

1,021 commits

Author SHA1 Message Date
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
Marcelo Matus
81a30d97f9 cosmetic fix to avoid warnings in the generated code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-28 01:47:19 +00:00
Marcelo Matus
6dceec6fdb 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/SWIG@5690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-27 23:39:35 +00:00
Marcelo Matus
3fdd06e3bd fix memory leak with director and NewPointerObjects
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5688 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-26 10:20:06 +00:00
Marcelo Matus
c083368322 fix expansion for templates, ie from Type<(int)> to Type<int>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5686 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-25 09:22:35 +00:00
Marcelo Matus
1f6fdafc65 add support for 'throw' declarations in director classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5682 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-24 00:28:54 +00:00
Marcelo Matus
8f2056b4d6 add support for 'throw' declarations in director classes and some fixes to compile the primitive_types.i test file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5681 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-24 00:25:31 +00:00
Marcelo Matus
4e7f391eba saves the rawval constant attribute when presents. this simplifies the generation of typemaps for char/strings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5679 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-23 23:26:46 +00:00
Matthias Köppe
72c6025d53 Uniquify the argument names used in GOOPS method declarations.
Reported by rm@mh-freiburg.de.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5677 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-23 15:05:34 +00:00
William S Fulton
11561b2499 Eric Sunshine patch - Mods to work on NextStep
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5674 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 22:42:18 +00:00
Marcelo Matus
805e68d53d simple in fix the %new cleanup and the destructor handler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5670 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 08:00:49 +00:00
Marcelo Matus
f5fc2d494d sorry, last commit was from an older version
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5669 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 07:17:05 +00:00
Marcelo Matus
6e49d626d4 more comments and cases in the unrollVirtual method, still there is one that is not working...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5668 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 07:07:41 +00:00
William S Fulton
e810800783 forte warning fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5663 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 21:27:43 +00:00
Marcelo Matus
e9ee50827d fix the generation of spurious temps, and an exception call
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5660 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 01:33:07 +00:00
Marcelo Matus
5078783796 better treatment of the '0' director methods case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5658 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 01:04:50 +00:00
Marcelo Matus
9cfb9a490b fixes for the nodirector feature and the '0' director member case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 00:46:08 +00:00
William S Fulton
62e094fe92 Removed redundant catch(...) { throw; } code generation when wrapping exception specifications and throws typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5646 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-19 21:34:58 +00:00
William S Fulton
b0df32dd1a Various warning fixes for .NET 2003 cl /W4 to work barring one warning and for gcc -ansi -Wall -pedantic to be warning free:
const fixes and function prototype declarations matching the definition etc


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 22:46:07 +00:00
Marcelo Matus
8d9bdc8148 minor cosmetic fixes in the 'error' attribute
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5636 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 09:02:41 +00:00
Marcelo Matus
bd9aa0c7c9 - Normalize the 'Swig_error' calls and formats, before some
of the strings start like "Error. XXX", others like "XXX".
  The format is now defined in 'error.c:Swig_error_msg_format()'.

- Normalize the multiline error/warning messages to correctly
  use -Fformat definition.

- Centralize the error/warning format definitions in
  'error.c:Swig_error_msg_format()'.

- Fix a minor error in cpp.c, that after finding an error, still
  was emitting a redefined macro, producing duplicated error/warning
  messages in parser.y.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 08:33:12 +00:00
Marcelo Matus
74d6f1eb43 Added the warning code
WARN_PARSE_REDUNDANT          322

similar to the g++ -Wredundant-decls flag.

This recovers the warnings that now are not been reported by
the original code

   WARN_PARSE_REDEFINED          302

Redundant example:

   int foo(int);
   int foo(int);

Redefined example:

   int foo(int);
   double foo(int);


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5634 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 08:16:53 +00:00
Marcelo Matus
eaa0062cd2 Fix for friend declarations, and other 'repeated' declarations.
Now, this doesn't generate warnings:

 class A; class B*;

 int foo(A*, B*);

 struct A {
   friend int foo(A*, B*);
 };

but this generates

 struct B {
   friend double foo(A*, B*);
 };

which is correct, since they have different return types.

See the redefined.i file for most cases where
repeated (but not redefined) declarations are
not generating warnings now, such as:

// no warning
#define REPEATED 1
#define REPEATED 1

// yes warning
#define REDEFINED 1
#define REDEFINED 2

this is following the C, C++ and preprocessor
standard behavior.

The function 'need_redefined_warn(..)' was added to
util.c, if some strange corner appears, and therefore,
the parser.y file doesn't need to be changed latter.

Also, the redefined warning format in parser.y
was changed, so now it respond to William's -Fmicrosoft
flag.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5633 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 03:16:40 +00:00
Dave Beazley
acee037c44 Fixed bug in preprocessor expression evaluator. (backslash).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5632 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 00:58:13 +00:00
Marcelo Matus
b44aafbe68 eliminate spurious temporal variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-14 06:46:20 +00:00
Marcelo Matus
6d1978b1ef added friend support and reduced spurious name(kw) warnings for non-wrapped symbols
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:32:13 +00:00
Marcelo Matus
c94ed86295 added friend dec support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:20:37 +00:00
Marcelo Matus
2dfcd1a562 fixed repeated file inclusion for dirprot mode
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:19:48 +00:00
Marcelo Matus
66c06af171 added support for friend declarations and clean/fix the
unrollVirtualMethods for the error shown in the director_redefined.i
example.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 01:12:53 +00:00
Marcelo Matus
89b8bdc89e fixed dirprot member detection and add code to detect when a node need to checked for kw warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 00:52:25 +00:00
Marcelo Matus
a5740e3de1 added docs for -Werror and -w<list>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5619 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 00:46:59 +00:00
Marcelo Matus
faee816f18 improved warning for abstract classes and fixed a spurious warning for smart_pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-13 00:43:44 +00:00
Marcelo Matus
386d53ce62 fix precatching exception behaviour to postcatching
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-12 23:40:58 +00:00
William S Fulton
6c61bbf852 Warning and error messages output is selectable via commandline options
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5613 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-10 00:08:18 +00:00
Dave Beazley
93cf752b25 Fixed [ 871909 ] simple namespace problem.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5611 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-09 19:36:58 +00:00