Commit graph

88 commits

Author SHA1 Message Date
William S Fulton
47e471fc7e Modifications to the typemaps giving users fine control over memory ownership and lifetime of director classes. Patch from Scott Michel.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@7070 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-15 21:31:31 +00:00
William S Fulton
2906fc959e swig -help prints to stdout not stderr now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6964 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 23:04:10 +00:00
William S Fulton
012866444a Code using SWIG_exception macro will now correctly return immediately back to the JVM.
When wrapping member variables, the JNI code is emitted before the Java code - fixes subtle bugs in typemap matching rules.
More fixes to ensure typemap matching rules work for member variable and global variable setters.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6947 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 21:48:59 +00:00
William S Fulton
0f88f19531 Remove unnecessary protected default constructor when there is no default proxy constructor.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-01-11 22:56:19 +00:00
William S Fulton
408a7ca9d3 new typemap: javaconstruct. This typemap contains the code that goes into the proxy constructor.
The javaconstruct_director typemap is used instead when directors are enabled.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6921 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-01-10 22:32:33 +00:00
William S Fulton
f91144e004 small tweak to canonicalizeJNIDescriptor()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6843 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-07 23:24:13 +00:00
William S Fulton
35b1c77401 new directorconnect and directorconnect_derived typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6840 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-07 23:04:54 +00:00
William S Fulton
27f09fac81 tidyup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-06 22:53:09 +00:00
William S Fulton
f7e8a925dd fix for member enums in director methods (for typesafe enums and proper enums)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6826 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-02 21:26:30 +00:00
William S Fulton
46e92bfac3 Director code mods:
JNI field descriptors fix to use C++ type and correctly use the $javaclassname family of special variables.
The real C++ type used everwhere in director code to fix numerous director bugs.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6799 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-30 20:31:51 +00:00
William S Fulton
a8df2a0080 Fixes for enums no longer being handled as integers in the core.
New special variable $*javaclassname to compliment $&javaclassname and $javaclassname.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-28 19:03:02 +00:00
Marcelo Matus
f678d1eed0 support/ignore multi-inheritance directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-15 22:52:38 +00:00
William S Fulton
11d77ef9ae various fixes to remove warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6580 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 21:10:06 +00:00
William S Fulton
b416ab7464 director generated code formatting improvements to bring Java in line with the other languages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6552 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-29 21:36:41 +00:00
Marcelo Matus
53b60a0483 using the Language::abstractTestClass, since now it also considers the director case, and is more complete
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6541 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-28 19:30:27 +00:00
Marcelo Matus
761d718eb6 add Scott's patch for directors with no members
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6521 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 20:39:02 +00:00
William S Fulton
e03dbc323b Scott Michel patch #1049496 to fix typesafe and proper Java enums with directors.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6481 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-22 21:12:36 +00:00
John Lenz
4645346381 Removed ability to share type information by C linking
All type sharing happens through a global variable in the target language.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 18:23:59 +00:00
William S Fulton
553422a11e Fixes for director code with exception specifications on the destructor (director_exception.i testcase)
Had to remove hack for Scott Michel's broken compiler though
Scott can you try another hack?


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6359 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-07 19:45:00 +00:00
William S Fulton
9b40e16ea8 fixes for the new default argument wrapping in director constructors and virtual methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6354 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 21:10:24 +00:00
William S Fulton
550476ac58 Warning fix for directors submitted by Russell Magee
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6247 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-14 21:37:18 +00:00
William S Fulton
2fc7f17ec7 Oops, undo last commit
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6221 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-04 00:19:42 +00:00
William S Fulton
9fe21957a6 director fixes on error
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6206 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-01 22:27:46 +00:00
William S Fulton
fb7b5a6cf5 Fix for directors when wrapping virtual methods with exception specifications
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6154 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-08-26 20:59:25 +00:00
William S Fulton
06c6ab33f8 Fixes to compile on some buggy Redhat gcc 2.96 versions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6089 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-08-12 21:12:21 +00:00
William S Fulton
5e5ba98ffd director enum fixes from Scott Michel
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6035 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-07-12 19:46:45 +00:00
William S Fulton
5b10a2cb11 Support for %javaconstvalue added (better compile time constants)
Support for %feature("except", throws="ExceptionClass") so that any Java exception classes thrown from JNI code can be added to the throws list - handled in the same way as the 'throws' attribute in typemaps.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6000 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-27 21:00:05 +00:00
William S Fulton
83f70b7d17 javagetcptr and javaptrconstructormodifiers typemap replaced by the javabody/javabody_derived typemap
javaclassmodifiers typemap now contains the class type
jniclassclassmodifiers and moduleclassmodifiers pragmas now contain the class type
$module special variable support


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5968 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-03 22:38:05 +00:00
William S Fulton
bef3646321 typesafe enum support for storing the enum name (for toString)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5958 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-31 07:24:54 +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
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
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
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
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
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
William S Fulton
238e948bbe Eric Sunshine patch - Mods to work on NextStep
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5674 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-22 22:42:18 +00:00
Marcelo Matus
6b0485b6b5 fixes for the nodirector feature and the '0' director member case
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5657 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 00:46:08 +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
William S Fulton
0af36656c1 Covariant return type fixes...
Fixed error where the base class was being used to wrap the derived class C++ pointer.
Also fixed runtime error when using directors - the wrong canonical description was not using the base class type.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5589 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-23 21:45:38 +00:00
William S Fulton
baa06d2509 %javamethodmodifiers (java) and %csmethodmodifiers (C#) operate slightly differently.
Previously this had to be present to set the method modifiers. Now this feature is only
used if it exists for the method being wrapped. The default is "public" as previous
however, when wrapping protected director methods it is "protected".


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:13:10 +00:00
William S Fulton
6acb22fbfc Marcelo's suggestion for fixing polymorphic methods that return a polymorphic type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 22:13:31 +00:00
Marcelo Matus
86edc68494 The dirprot feature is now disabled by default. Added dirprot option and ruby runtime examples.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5510 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 02:52:08 +00:00
William S Fulton
e6b5758132 Use classtypeobj instead of classDeclaration:name for typemap searches.
Thanks Dave.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5462 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 22:16:00 +00:00
William S Fulton
337c3dd301 Minor bug fix from that initializes the jlong pseudo-pointer to 0 in director methods (makes the Java equals method based on getCPtr() work consistently.)
Submitted by Scott Michel.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-30 21:18:40 +00:00
William S Fulton
6bda2826e0 Director fix for #include "xxxx_wrap.h". Was incorrectly adding a directory in some situations. See #848335.
#849064 fixed. Any classes with a non public destructor now have a public delete() method which throw a runtime exception. The delete() method was previously protected.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5439 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-28 23:12:28 +00:00
William S Fulton
8d7f52dfc6 Contract assert macro modification to handle void and non-void return types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-18 22:38:34 +00:00
William S Fulton
2cd181ba5f Common director support functions moved to new file directors.cxx
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5335 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-18 20:21:39 +00:00
William S Fulton
cffc4ed31a Director fixes for methods returning enums and references contributed by Scott Michel
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5326 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-16 17:05:40 +00:00
William S Fulton
e0d8b04919 director ricochet removal from Scott Michel and generated director code tidy up
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5309 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-12 21:12:30 +00:00
William S Fulton
2636349aa1 Scott Michel patch which removes supefluous ricochet director checking code except for pure virtual methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@5288 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-10 22:26:36 +00:00