Commit graph

102 commits

Author SHA1 Message Date
Marcelo Matus
996756f4a7 fix repited class name in scope resolution
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6698 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-08 23:20:22 +00:00
William S Fulton
f2a56de128 %rename/%ignore mods so that the behaviour is the same as %feature for default args
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-05 23:27:10 +00:00
Marcelo Matus
32b724e75c remove old patch for features + def arg, but save the ignore/rename part. Now everything seems to be working.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6668 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-04 23:18:01 +00:00
William S Fulton
76dc5e3f3b Alternative %feature improvements for methods with default args, that works with constructors.
Marcelo, I've commented your approach out using #define MARCELO. Lets discuss on swig-dev.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6660 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-04 22:09:29 +00:00
Marcelo Matus
44009421a8 fix %features/%rename + def args
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-04 18:41:31 +00:00
Marcelo Matus
a6dba8577d making sure the resolve_scope_node is working fine before release, and fix for unnamed namespace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6641 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-03 08:07:02 +00:00
Marcelo Matus
ad7d943dfc fixes for %template+member/static methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6636 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-03 00:59:38 +00:00
William S Fulton
c5e0c0094c Default args fix for const methods. The extra methods being generated were non-const.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6624 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 21:22:49 +00:00
Marcelo Matus
73248606bf fix %template + static class members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6623 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 20:04:59 +00:00
Marcelo Matus
ee0b146afd fix %template + static class members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6622 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 19:40:41 +00:00
Marcelo Matus
2a799d9bcd more uniform treatment of extern C. This also fix the defarg mechanism when declaring C functions inside C++.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6621 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 19:03:01 +00:00
Marcelo Matus
5206f539fd last fixes for namespaces
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6609 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 02:12:01 +00:00
Marcelo Matus
9c0c4fb898 last fixes for namespaces
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6607 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 01:50:21 +00:00
Marcelo Matus
ad3b351313 fixes for namespaces + class declarations + %template directive
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6576 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 08:38:21 +00:00
William S Fulton
ede61c2fd7 segfault fix for global scope operator used in friend declaration
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6550 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-29 21:33:31 +00:00
Marcelo Matus
1ac5674df0 add templatereduce option
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-28 23:49:41 +00:00
Marcelo Matus
4b7f369f7e better option name templatereduce
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6542 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-28 19:31:33 +00:00
Marcelo Matus
7afd2f554b fix SWIGENUM -> enum SWIGTYPE, as is used now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6528 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-27 01:59:20 +00:00
Marcelo Matus
a4064070b0 Recover original types in template expansions.
Added the module option "tpltreduc" to force Swig to
reduce all the typedef found in a template, usually
as a compiler will do. This allows swig to parse
very ugly template + typedef code, but it can prevent some
typemaps for working.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6527 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-27 01:57:36 +00:00
Marcelo Matus
6c207e1cab eliminate the reduce/reduce conflicts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6525 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 22:08:36 +00:00
Marcelo Matus
0a1dd2a422 third attempo to commit, same changes, ie director + nested but no extra shift/reduce
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6518 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 06:53:04 +00:00
Marcelo Matus
41b8e7fec9 previous commit incomplete, this one really fix derive_nested.i
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6515 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 01:15:10 +00:00
Marcelo Matus
510112f49f solve using+namespaces (using_namespace.i) and nested+derived classes (derived_nested.i)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 00:21:40 +00:00
Marcelo Matus
8ac154a748 Fix directors + protected pure virtual members + protected
constructor.

Now it doesn't crash, you don't need to use dirprot, and no, it is not
emitting all the protected members, unless dirprot is used.

Swig only emits the protected members or constructors needed to prevent
the compilation for crashing. The rest of the protected members
are emitted when dirprot is used.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6493 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-24 05:58:15 +00:00
Marcelo Matus
3204181b17 fix wrong warning from keyword + friend
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6490 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-24 05:45:23 +00:00
William S Fulton
97c2eeaf90 compact default arguments feature (original default argument wrapping mode)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6449 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-20 20:59:33 +00:00
William S Fulton
2128e98a15 - compact default arguments feature (original default argument wrapping mode)
- fix for templated functions in a namespace


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-20 20:49:49 +00:00
Marcelo Matus
c9ac6a4cb8 fix for template+default template params, better warnings, better management of extern "java"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 01:23:20 +00:00
William S Fulton
77eef87058 templated function overloading support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6394 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 20:41:17 +00:00
Marcelo Matus
41058bf661 add initial C99 complex support + long double
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6384 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 08:18:14 +00:00
Marcelo Matus
085e7a8329 fix extend_placement.i case, ie extend overloding + member overloading
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6334 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 23:17:40 +00:00
William S Fulton
41b4b2f033 revoke previous %extend+overload fix.
It might need to come back to fix templates. Not sure yet.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6328 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 22:15:45 +00:00
Marcelo Matus
e16136ee00 add support for empty throw(), needed by director
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6319 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 20:57:08 +00:00
Marcelo Matus
2792ac8752 several fixes, see CHANGES.current 10/04/2004
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6317 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 00:19:26 +00:00
William S Fulton
ad39b124c8 New default argument wrapping approach. This adds default argument support for statically typed languages, fixes wrapping of default arguments that are non-public plus fixes other bugs where SWIG could not or failed to correctly lookup up the default value in the symbol table.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6305 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-04 20:19:31 +00:00
Marcelo Matus
7757e31139 fix %extend+overload error
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6298 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-04 03:18:57 +00:00
Marcelo Matus
a59ceff827 fix bitfield with expr
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6286 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-02 02:11:40 +00:00
William S Fulton
7e5ec7742c Fix for enum forward declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6117 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-08-23 20:10:51 +00:00
William S Fulton
da43bcfe72 missing ;
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-12 19:46:10 +00:00
William S Fulton
000c8d455a 1)
%feature improvements for the syntax that takes the feature value within the
            %feature() brackets. The value specified is no longer restricted to being just
            a string. It can be a string or a number. For example, this is now acceptable
            syntax:
              %feature("featurename",20.0);
            whereas previously it would have to have been:
              %feature("featurename","20.0");
            Useful for features that are implemented as a macro, for example:
              #define %somefeature(value)      %feature("somefeature",value)
            These will now work accepting either a string or a number:
              %somefeature("Fred");
              %somefeature(4);

2)
            %feature enhancements. Features can now take an unlimited number of attributes
            in addition to the feature name and feature value. The attributes are optional
            and are much the same as the typemap attributes. For example, the following
            specifies two optional attributes, attrib1 and attrib2:

             %feature(featurename, attrib1="attribval1", attrib2="attribval2") name "val";
             %feature(featurename, val, attrib1="attribval1", attrib2="attribval2") name;


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5997 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-27 20:48:57 +00:00
William S Fulton
ca13628e60 Unnamed enum instance in global scope fix
enumvalueex attribute now set during the type pass


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 20:13:55 +00:00
William S Fulton
11f26b416c Fix for unnamed enum member variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5882 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-22 20:36:13 +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
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
Marcelo Matus
22d2c01b50 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@5749 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 08:01:06 +00:00
William S Fulton
0d2ef5a3ce Fixes for compilation by the Digital Mars Compiler. Submitted by Scott Michel.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5728 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-20 22:51:47 +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
330628162e 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@5679 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-23 23:26:46 +00:00
William S Fulton
8377edf02a 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@5639 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-15 22:46:07 +00:00