Commit Graph

348 Commits

Author SHA1 Message Date
William S Fulton e182b4844c Fix seg fault in SWIG using directors when class and virtual method names are the same except being in different namespaces when the %nspace feature is not being used. 2013-03-19 19:50:44 +00:00
William S Fulton 0e6af5c0ea Fix cstype typemap lookup for member variables so that a fully qualified variable name matches 2013-01-15 06:45:47 +00:00
William S Fulton 7841a0d097 Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
William S Fulton 5889d7bfdd Merge branch 'SFbug1299' of https://github.com/BrantKyser/swig into BrantKyser-SFbug1299 2013-01-11 23:12:06 +00:00
William S Fulton 13d9e19cdb Fix spacing in generated code for csdirectorin 'pre', 'post' and 'terminator' attributes. Add some more tests for these attributes. 2013-01-11 19:47:10 +00:00
Brant K. Kyser e1a59ae2c7 Clean up local variable name that store the director class's name to prevent confusion with the class name. 2013-01-08 21:38:57 -06:00
Vladimir Kalinin 2b407f4b27 SF Patch#268 - Add 'pre', 'post' and 'terminator' attributes to the csdirectorin typemap
"csdirectorin" "pre:" and "post" code attributes in C# module. Without them it is
not trivial to marshal strings and smart-pointers back and forth
between user callback code and native code. (especially by reference)

Also fixes 2 minor issues in director code generation that are
difficult to come by until "csdirectorin" attribute is extended.
The first is that "ref" types used in directors lead to invalid
signature generation (the type array used to match methods possibly
overloaded by user). typeof(ref T) is used instead of
typeof().MakeByRefType()
The second is that ignored director methods are not completely ignored
- if there was a %typemap(imtype, "directorinattributes") it is not
skipped for ignored method.
2013-01-09 00:11:41 +00:00
Brant K. Kyser c62cd63f71 Patch for SourceForge Bug #1299 broke D and C#. Update C# module to reflect these changes. 2013-01-05 05:25:33 -06:00
William S Fulton d93dc0f8e2 Distinguish between an "abstract" attribute on a class containing a list of abstract members and an "abstract" flag on pure virtual methods - renamed former to "abstracts"
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13935 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-24 14:13:58 +00:00
William S Fulton 0d2c459046 Remove some unused code and pointless variable assignments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-23 07:38:00 +00:00
William S Fulton 0c7bc36122 Fix obvious copy/paste errors in some director code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13914 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:47:48 +00:00
William S Fulton 660b15ea5a Correctly handle errors if language symbol already exists
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13913 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:46:21 +00:00
William S Fulton e0967f3e13 Fix unnecessary and inconsistent null pointer checks
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13912 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:44:48 +00:00
William S Fulton 288e45cb15 Add some assertions to ensure NULL pointer is not used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13910 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:42:17 +00:00
William S Fulton d918bddfc0 Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:18 +00:00
William S Fulton fd24b188e2 Fix Coverity 'Uninitialized pointer fields' - member variables are now initialized
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:17:28 +00:00
William S Fulton 46d2486115 Resource leak fixes (or hiding them from Coverity static analysis tool by using String instead of char *)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13886 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:54 +00:00
William S Fulton 5a1e82a2f4 Remove DohClose (Close) and replace with calls to DohDelete (Delete) to fix some minor memory leaks in most uses of NewFile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:07 +00:00
William S Fulton f6229d4b73 Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously the name was ignored during the typemap search. Implemented by ensuring the 'type' attribute in the Node is set up correctly and using the usual Swig_typemap_lookup on the Node.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:37:34 +00:00
William S Fulton 315dc5a879 Fix some memory issues - use of deleted memory highlighted by DOH_DEBUG_MEMORY_POOLS
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-05 22:17:32 +00:00
William S Fulton b989e43922 Fix incorrect object deletion in C# module
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13522 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-05 16:17:32 +00:00
William S Fulton 2d24ca37d1 Fix invalid code sometimes being generated for C# director methods with many arguments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13519 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-08-05 15:49:43 +00:00
William S Fulton 11185e66b1 Add support for %nspace when using directors - C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12892 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-01-07 22:09:28 +00:00
William S Fulton de5a78c781 Expand symname special variable in director typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-23 16:27:15 +00:00
William S Fulton 468ca084fc Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-20 20:50:36 +00:00
William S Fulton 24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
William S Fulton 8b9afd0772 Fix %callback which was generating uncompileable code for C# and D
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12785 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-26 18:05:50 +00:00
William S Fulton b13ec94386 SF bug #3195112 - fix wrapping of enums that are type char
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12557 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-26 15:28:31 +00:00
William S Fulton a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
William S Fulton b69b793d8e Better consistency in usage display
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 21:42:38 +00:00
William S Fulton 4a73d986dd Any 'using' statements in the protected section of a class were previously ignored with dirprot mode, certainly with Java and C#. Also directors - a call to a method being defined in the base class, not overridden in a subcalss, but again overridden in a class derived from the first subclass was not being dispatched correcly to the most derived class - affecting non-scripting languages. Fix for C# is based on recent fix for D.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-01 07:02:50 +00:00
David Nadlinger 91523f7510 [C#, D, Java] Check for collision of parameter names with target language keywords when generating the director glue code.
The situation in which the generated could would previously be invalid is illustrated in the new 'director_keywords' test case.

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12358 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-30 15:40:17 +00:00
William S Fulton 7f4283f684 Fix special variable not being expanded for csvarin typemaps when used for global variables
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12354 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-23 20:27:34 +00:00
William S Fulton 61fefd8cc4 Remove bad usage of a String rather than SwigType for csharp directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12325 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-12-07 20:12:17 +00:00
William S Fulton 6c094629cb File and line number corrections for warnings WARN_JAVA_MULTIPLE_INHERITANCE WARN_MODULA3_MULTIPLE_INHERITANCE WARN_CSHARP_MULTIPLE_INHERITANCE and errors 'The javabase typemap for proxy' 'No methodname attribute...' 'No methodmodifiers attribute...' 'The csbase typemap for proxy...'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12224 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-20 19:11:55 +00:00
William S Fulton 45f20c7363 Fix constants wrapper warnings for visual c++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12064 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-28 22:24:11 +00:00
William S Fulton 7b2c6b477a Fix segfault attempting illegal javaclassname and csclassname special variable substitution
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12058 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-26 19:01:12 +00:00
William S Fulton 12cfc251e4 Fix #2408232. Improve shared_ptr and intrusive_ptr wrappers for classes in an inheritance hierarchy. No special treatment is needed for derived classes, the SWIG_SHARED_PTR_DERIVED macro is deprecated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12036 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-22 22:49:47 +00:00
Olly Betts bf1d3f0714 Remove superfluous semicolons.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12034 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-21 07:10:12 +00:00
William S Fulton 8a169eb0cb Fix wrapping of C++ enum boolean values
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12028 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-05-14 18:46:20 +00:00
William S Fulton 31485a7b3b Fix nspace when no -namespace is used (for C#)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11949 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-17 19:35:45 +00:00
William S Fulton cd317b3f1c Java/C# constants fix after last nspace commit
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11947 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-13 23:39:46 +00:00
William S Fulton e81bfb86c0 Correct file and line number display for some error messages, these now also result in exiting with an error.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11945 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-13 23:08:02 +00:00
William S Fulton 7ed1528349 nspace fixes and adding in missing symbols in language symbol tables for Java and C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11937 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-13 00:05:31 +00:00
William S Fulton 7af8eb954b add some missing nspace support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11936 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-10 22:00:14 +00:00
William S Fulton 4853346745 remove duplicate special variable replacement
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-10 08:07:39 +00:00
William S Fulton 8d227bce62 Slightly efficiency improvements for packages/namespaces/
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11933 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-10 07:50:32 +00:00
William S Fulton bce282fa0c Minor tweaks
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11931 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-10 07:29:16 +00:00
William S Fulton 96f9879511 Fixes for nspace and derived classes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-09 21:15:34 +00:00
William S Fulton b6b99bb148 Add nspace feature for C# and add documentation on nspace
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11920 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-06 19:11:32 +00:00
William S Fulton 1253657bb4 Add improved namespace support - the nspace feature, working for Java only at the moment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11896 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-03-04 21:27:23 +00:00
William S Fulton cb64f65bae SWIG license change - Source moves to GPLv3
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11876 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-27 23:53:33 +00:00
William S Fulton 4bf5049397 Improve target language symbol tables for Java and C#, using different scopes for the constants interface, module class and intermediary class rather than incorrectly putting all the symbols into one scope
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11857 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-13 00:42:09 +00:00
William S Fulton 65f1e47cb2 remove some unnecessary casts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11853 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-02-11 21:59:16 +00:00
William S Fulton 83bd820285 Add typemaps used debugging option (-debug-tmused). Fix missing file/line numbers for typemap warnings and in the output from the -debug-tmsearch/-debug-tmused options
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11802 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-01-04 19:33:52 +00:00
William S Fulton bf8ba3bf55 Fix generated quoting when using %javaconst(1)/%csconst(1) for static const char member variables.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-29 01:29:26 +00:00
William S Fulton 1dd50f5ea8 Fix %javaconst(1)/%csconst(1) for static const member variables to use the actual constant value if available
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11758 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-11-26 19:20:31 +00:00
William S Fulton 5eeab68e21 Add %csattributes for adding C# attributes to enum values, see docs for example.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11691 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-14 19:37:55 +00:00
William S Fulton 4ebb9b0db2 minor rewrite of enum value handling
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11690 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-09-13 20:20:11 +00:00
William S Fulton 4516c1d3f3 Fix exception handling when %catches is used in C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-08-15 23:22:20 +00:00
William S Fulton 7f0e632ddd typemap method name: use consistent terminology in code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11473 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-30 06:06:49 +00:00
William S Fulton bf0ee4471c (method, typelist) special variable macro fixed/enhanced and made official
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-29 20:50:39 +00:00
William S Fulton 224c83ef09 Typemap API changes to facilitate more uniform typemap handling across language modules - in particular some typemaps usage did not respect the warning attribute and other warning handling and $typemap special variable (which will be refined in future commit) as well as local typemap variable handling:
- remove Swig_typemap_search, Swig_typemap_search_multi and Swig_typemap_attach_kwargs from access outside of typemaps.c (made static)
  - all static methods in typemap.c renamed dropping Swig_ prefix


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11380 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-07-08 12:17:45 +00:00
William S Fulton c7d90e58d8 improve some director warning messages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11316 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-25 06:01:11 +00:00
William S Fulton 0a1c7c91b1 fix Java and C# enums when one of the enum items is ignored
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11279 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-06-16 19:29:08 +00:00
William S Fulton 7e8d19cec0 Add the 'notderived' attribute to the javabase and csbase typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11196 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-04-29 17:58:32 +00:00
William S Fulton efa11dee52 add new %begin directive for inserting code at top of wrapper file
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11133 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-02-20 07:52:24 +00:00
Haoyu Bai 6d2aef67d9 Replaced all [const] String_or_char * to const_String_or_char_ptr, by the following command:
sed -i "s/\(const \)\?String_or_char \*/const_String_or_char_ptr /g" CParse/* Include/* Modules/* Preprocessor/* Swig/*

This is a preparation for moving to new DOH, since for strong typed objects we need the const_String_or_char_ptr class to implicit convert to and from String * or const char *.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11080 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-24 13:15:51 +00:00
William S Fulton 5ec2d8c166 All languages now define a macro in the generated C/C++ wrapper file indicating which language is being wrapped, eg #define SWIGJAVA
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11018 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-30 00:38:34 +00:00
William S Fulton cc522323d7 create a common banner header for all target language specific files
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11016 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-29 22:56:25 +00:00
William S Fulton 6fb0f48935 customised ccache support: read the CCACHE_OUTFILES env variable and if exists, the names of all generated files are written to the filename specified in the env variable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10898 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-11-03 12:51:45 +00:00
William S Fulton 044895ef6e Add new terminator attribute for the csin typemap for C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10808 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-02 20:56:52 +00:00
William S Fulton b02017c658 fix potential null pointer usage as reported by Coverity Prevent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10608 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-29 00:50:27 +00:00
William S Fulton dfcd771463 Fix enums when using -noproxy
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10516 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-02 20:15:39 +00:00
William S Fulton 9ecf676f70 Fix variable wrappers when using -noproxy
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-29 00:45:28 +00:00
William S Fulton dac30b0de2 Fix variable wrappers when using -proxy. Patch from Jan Jezabek
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10503 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-28 09:44:37 +00:00
William S Fulton dfcb1640bf Remove old swig-1.1 Swig_typemap_lookup function. Rename Swig_typemap_lookup_new() to Swig_typemap_lookup()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10453 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-15 21:18:44 +00:00
William S Fulton 336b50b43d Add the optimal attribute to the out typemap for more optimal code generation when returning objects by value
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10450 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-14 22:12:31 +00:00
William S Fulton 46a0db50fe enforce consistency in wrap:action wrt line spacing
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10411 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-01 21:47:23 +00:00
William S Fulton 9976dc9d75 Add allprotected mode for wrapping protected members when using directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10381 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-04-20 20:41:01 +00:00
William S Fulton bc94eeb6a0 Add 'directorinattributes' and 'directoroutattributes' typemap attributes for the imtype typemap. These should contain C# attributes which will be generated into the C# director delegates methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10212 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-18 23:35:49 +00:00
William S Fulton 39abd80eef Changes to compile with VC++6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-10 21:10:17 +00:00
William S Fulton 421eb7ae60 New templated method SwigValueInit to initialise all types - used initially for return types in director methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10063 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-28 23:07:33 +00:00
William S Fulton 30964be253 Fix uninitialised variable usage on error in director methods. Minor formatting change for director methods variable declaration.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10019 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-22 21:30:19 +00:00
William S Fulton a43e50ac07 fix generated code for derived classes when csbase or javabase typemaps are used with the replace=1 attribute.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10016 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-19 21:48:05 +00:00
William S Fulton fe042d2ebc Replace cvs $Header$ with svn $Id$
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10003 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-17 21:42:11 +00:00
William S Fulton 8a17d9dcfa Back out valueparm attribute in the csvarin typemap. Add example usage of temporary variables in the csvarin typemap into docs. Modify CDate C# example. Add in special variable expansion in the csvarin typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9949 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-21 23:58:00 +00:00
William S Fulton d737022daa More flexible variable wrappers (C# properties). The property set can now support a different type to that used in the intermediary layer. This is achieved by using a temporary variable and specifying the name of the temporary variable in a new 'valueparm' attribute in the csvarin typemap. Also Fix bug reported by Glenn A Watson and #1795260 where the cstype typemap used the 'ref' keyword in the typemap body. The type for the property now correctly comes from the 'out' attribute in the cstype typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9946 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-19 23:54:19 +00:00
William S Fulton 2824efe6ba Fix bug #1776651 - bug when the director class name is similar to other symbols being used
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9908 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-20 19:48:45 +00:00
John Lenz fb51964d01 Fix a bunch of minor bugs found by Coverity scanner
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9889 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-10 02:55:27 +00:00
William S Fulton aa32a6b094 Add support for in the out typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-08-09 22:17:12 +00:00
William S Fulton d269f9cd16 Fix directors for some overloaded methods where the imtype resulted in identical methods being generated in the C# director class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-07-03 22:39:35 +00:00
Olly Betts 6ffb9fa179 Remove unused Printf() parameter, and simplify resultant code.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9821 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-17 22:53:50 +00:00
William S Fulton 0090cac1d0 Add in pre, post and cshin attributes for the csin typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9678 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-17 22:45:17 +00:00
Dave Beazley c12550e4ad API cleanup. Documentation
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9631 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-01-03 05:23:20 +00:00
William S Fulton 97b1fbaa02 -fakeversion appears in generated files. Made comment with version number at top of generated files consistent.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9563 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-15 23:45:47 +00:00
William S Fulton 8c2b66a11d Fix director operator pointer casts
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-09 22:32:28 +00:00
William S Fulton 91b880e01c warning fix for vc++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9509 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-02 00:43:55 +00:00
William S Fulton aa04c4c057 beautify/format source code with gnu indent
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9505 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-11-01 23:54:54 +00:00
William S Fulton 01cc0b2bd8 Fix %csmethodmodifiers for smart pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-31 21:59:33 +00:00
William S Fulton d668f54a14 Fix %ignore director constructors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9484 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-26 18:42:40 +00:00
William S Fulton 016db92c82 Fix smart pointer wrappers. The virtual/override/new keyword is not generated for each method as the smart pointer class does not mirror the underlying pointer class inheritance hierarchy. SF #1496535
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-24 20:29:27 +00:00
William S Fulton 7d7a9a387e %ignore and virtual director methods fix - problem reported by Roy Sutton
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9471 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-21 23:40:28 +00:00
William S Fulton 091efa9b7c $result expansion in directorout typemaps for consistent behaviour across all director languages
$result expands to c_result now instead of result like other typemap languages


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-20 22:57:38 +00:00
William S Fulton e1eb8a266c javabase/csbase typemaps mods to support morphing C++ abstract base classes into Java/C# interfaces
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9454 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-16 20:11:30 +00:00
William S Fulton 923df5c408 Better control on what the C# base class is (overriding the real C++ base class with the csbase 'replace' typemap attribute)
Reorganise the code that implements namespaces


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9447 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-13 23:47:01 +00:00
William S Fulton 1be9e42787 Avoid potential race conditions on the Dispose() method
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9444 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-12 23:10:18 +00:00
William S Fulton be89441352 Fix virtual conversion operators for directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9410 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 17:34:08 +00:00
William S Fulton 8d333d90f0 director error message fixes to correctly generate templated class names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9401 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-10-04 11:01:31 +00:00
William S Fulton 95958855cf More %ignore director fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9370 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-27 21:24:44 +00:00
William S Fulton da079c2d2b Fix #1505591 Throwing exceptions in extended directors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9361 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-25 21:47:08 +00:00
William S Fulton d096cc1613 %ignore director fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9326 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-22 23:29:34 +00:00
William S Fulton f0d1d772fa - explicitcall feature removed.
- Instead of using the swig_up flag in each director method (Python, Ruby, Ocaml) to indicate
whether the explicit C++ call to the appropriate base class method or a normal
polymorphic C++ call should be made, the new approach makes one of these calls
directly from the wrapper method.
- Java/C# recursive director method calls fixed (no need for explicitcall feature to solve this now)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9275 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-09-13 20:55:24 +00:00
William S Fulton c20e517238 Fix protected director methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9237 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-08-10 21:31:41 +00:00
William S Fulton d9d1a7d5c4 ensure $symname is suitably expanded
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-05 21:26:10 +00:00
William S Fulton 1aade65755 Only generate C# SwigDerivedClassHasMethod() if there are director methods in the class
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9140 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-06-02 21:00:26 +00:00
William S Fulton 2eff743367 director support added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9099 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-05-13 23:18:07 +00:00
William S Fulton 7f74b8e7a3 Common template for head of each file detailing licence, distribution and authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8972 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-06 22:51:01 +00:00
William S Fulton 2a26e53f75 forgotten check in from a while back needed for visual studio.net 2005
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8929 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-02 22:04:00 +00:00
Marcelo Matus 76a78eb125 fix C + struct + enums
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8766 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-09 23:14:33 +00:00
Marcelo Matus e8b3542f9a implement the naturalvar feature for global vars in java and csharp
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8577 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-28 02:38:00 +00:00
Marcelo Matus 55005e98ee Move rename/namewarn engine from parser.y to naming.c. The code was getting
too large to be in the parser.

Centralize the swig keys to avoid replication and wrong spellings.

Use more HashGetAttr where possible and other speed improvements
to compensate for the extra work introduced by the new rename/namewarn
mechanism.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8170 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-02 04:33:19 +00:00
Marcelo Matus b034e6c266 add support for options in rename/namewarn and central methods to access the rename/warning hashs
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8150 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-31 10:41:54 +00:00
William S Fulton 751086e8e0 new $imclassname special variable to fix bugs changing the intermediary classname
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8028 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-21 22:54:47 +00:00
William S Fulton 8c397aaa13 Portability warning for files which will overwrite each other on case
insensitive file systems such as FAT32/NTFS.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7832 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-09 22:57:09 +00:00
Marcelo Matus a4c0114c6a replace bad parameter names when neccessary
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-21 10:43:41 +00:00
William S Fulton 09444a7208 Fix for constants attempting to generate setters with %feature(immutable,"0")
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-15 01:14:21 +00:00
William S Fulton adecc68977 Multiple inheritance warnings and ignored base classes fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-08 11:42:20 +00:00
William S Fulton 963da5f126 Modify following features to work as flags, so that they can be truely set and unset:
cs:const


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7570 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-30 23:20:54 +00:00
William S Fulton 656cb7ab06 Modify following features to work as flags, so that they can be truely set and unset:
new


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7564 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-30 22:10:17 +00:00
William S Fulton bed81d66d3 Better error message displayed when file cannot be opened
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-08 22:31:21 +00:00
William S Fulton 2aae38d3c0 Support for the null attribute in the out typemap to support return by value struct types
SWIG_exception changes


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-07-22 21:23:17 +00:00
William S Fulton 8eb7e528b0 Make variable accessor functions the same across all modules for %extend with member variables to work consistently across all language modules and as documented. Use -oldvarnames commandline option to get the original variable names.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7313 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-23 20:30:14 +00:00
William S Fulton 71011d09a9 more patches for dodgy gcc-2.96 compiler from Hugo van der Sanden
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7303 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-17 20:31:08 +00:00
William S Fulton a2039dea5d fix for dodgy gcc-2.96 compilers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7291 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-16 21:21:21 +00:00
William S Fulton 0870b84abc Uniform handling of SWIGEXPORT across SWIG (was DllExport)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7233 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-27 22:40:40 +00:00
William S Fulton b29514ffcf %csmethodmodifiers can be applied to variables as well as methods now.
%csmethodmodifiers will replace the virtual/new/override modifiers that SWIG thinks is
appropriate in addition to the default 'public'. This is necessary for some obscure cases
where SWIG might get the modifiers incorrect, for example with private inheritance.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7227 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-26 20:49:03 +00:00
William S Fulton d00a8ee60f Covariant return types fixes
Any method which hides a base method is marked (for C# 'new' method modifier)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7209 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-23 21:03:50 +00:00
William S Fulton 7a72389977 covariant and override attributes better name
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7196 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-20 22:32:34 +00:00
William S Fulton 9bd7f1ec9a whitespace fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7191 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-13 21:40:55 +00:00
William S Fulton a0712b227f C# attribute support added - %csattributes feature, %csattributes typemap
and inattributes & outattributes typemap attributes for the imtype and cstype typemaps.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7184 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-12 20:19:47 +00:00
William S Fulton 9be34b6b9a support for asymmetric type marshalling - added out attribute for ctype, imtype and cstype typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7172 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-04-28 21:59:17 +00:00
William S Fulton acfb93f939 Fix typemap matching when wrapping variables (global, member and static member variables).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7152 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-04-14 20:19:59 +00:00
William S Fulton de090d94b1 warning change
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7090 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-20 22:11:11 +00:00
William S Fulton f149a9f3d1 swig -help prints to stdout not stderr now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6964 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 23:04:10 +00:00
William S Fulton 1df331a843 Code using SWIG_exception macro will now correctly return immediately back to managed code.
When wrapping member variables, the PInvoke code is emitted before the C# code - fixes subtle bugs in typemap matching rules.
More fixes to ensure typemap matching rules work for member variable and global variable properties.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-15 21:57:15 +00:00
William S Fulton 91b75b245f More of the new C# exceptions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6935 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-05 00:45:57 +00:00
William S Fulton bac8f43f79 C# exception handling improvements - they are robust and don't leak anymore. Requires typemap modifications using attribute canthrow in any unmanaged code typemaps that throw an exception and excode attribute in csout and csconstruct typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6934 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-02 22:44:32 +00:00
William S Fulton e5addbab84 new typemap: csconstruct. This typemap contains the code that goes into the proxy constructor.
The generated code is slightly different. A method called swigSetup is called during construction of the proxy object.
This is for a future change where a try finally block needs to be put around an unmanaged call during construction (for a new c++ to c# exception conversion handling mechanism)


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6922 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-01-10 22:35:37 +00:00
William S Fulton 347f342fab tidyup
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6839 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-06 22:53:09 +00:00
William S Fulton 380d10aac8 Fixes for enums no longer being handled as integers in the core.
New special variable $*csclassname to compliment $&csclassname and $csclassname.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6777 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-28 19:04:28 +00:00
William S Fulton dc12af75b6 various fixes to remove warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6580 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 21:10:06 +00:00
William S Fulton 909096be81 -dllimport commandline option and $dllimport special variable to specify the DllImport attribute
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6501 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-25 20:43:32 +00:00
John Lenz 75e462baa8 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/SWIG@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 18:23:59 +00:00
William S Fulton 16a711e90f Fixes to compile on some buggy Redhat gcc 2.96 versions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6089 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-08-12 21:12:21 +00:00
William S Fulton e86362442a Support for %csconstvalue added (better compile time constants)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5999 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-27 20:56:54 +00:00
William S Fulton 2846e01760 csgetcptr and csptrconstructormodifiers typemap replaced by the csbody/csbody_derived typemap
csclassmodifiers typemap now contains the class type
imclassclassmodifiers and moduleclassmodifiers pragmas now contain the class type
$module special variable support


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5969 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-03 22:39:16 +00:00
William S Fulton ac4df70a4c typesafe enum support for storing the enum name (for ToString)
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5959 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-31 07:25:18 +00:00
William S Fulton 97f5ccb180 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/SWIG@5924 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-24 20:19:36 +00:00
William S Fulton 9ae5f973d2 %import fix for C# enums
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5884 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-22 20:56:48 +00:00
William S Fulton 41724c135f 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/SWIG@5851 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-09 19:41:40 +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 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
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
William S Fulton e848fcb3d8 Covariant return type fixes...
Fixed error where the base class was being used to wrap the derived class C++ pointer.
Emit a warning when encountering these return types as the return type is changed to the base class type.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5590 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-23 21:46:56 +00:00
William S Fulton 2e0346a3a6 %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/SWIG@5553 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-13 00:13:10 +00:00
William S Fulton 4d9d790028 Marcelo's suggestion for fixing polymorphic methods that return a polymorphic type.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-09 22:13:31 +00:00
William S Fulton e021185ad1 Use classtypeobj instead of classDeclaration:name for typemap searches.
Thanks Dave.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5462 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-12-02 22:16:00 +00:00
William S Fulton 164b304971 Contract assert macro modification to handle void and non-void return types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-18 22:38:34 +00:00
William S Fulton e381e8ba60 $module name substitution to enable name mangling with the module name for the delegate registering functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5224 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-11-01 00:48:32 +00:00
William S Fulton 1035092471 void* used instead of int for IntPtr in C function declarations
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-10-16 21:34:38 +00:00
Dave Beazley 8ae4c60d39 Major refactoring of DOH List/Hash iterators. See CHANGES
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5101 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-09-11 20:26:57 +00:00
William S Fulton 49b83f44ed Support for throwing C# exceptions from C/C++ - $module special variable.
Pinvoke method's calling convention fix.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5020 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-29 20:09:32 +00:00
William S Fulton 6c71e9d478 -outdir commandline option support => directory for proxy class and other language specific files
-help tidy up


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4981 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-08-07 17:22:12 +00:00
William S Fulton a7fa8d86cc New typemap attribute which specifies the destructor wrapper method name thus making the wrapper method name configurable.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4933 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-29 21:52:26 +00:00
William S Fulton 2ef3a59918 throws attribute working for javain, javaout (Java), csout, csin (C#) and newfree typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4929 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-27 13:14:08 +00:00
William S Fulton c8d1feb8a0 Java output formatting change and tweak to protected/private destructors
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4902 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-12 19:46:27 +00:00
William S Fulton 4667d7bf2a C# typemap name change twiddle
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4897 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-12 12:32:08 +00:00
William S Fulton 4795f0012b Update so that the module doesn't look like it is wrapping Java! Variable name changes, comments etc modified.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4892 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-12 11:45:04 +00:00
William S Fulton b983da351d A number of the C# features, pragmas and typemaps have had their names changed.
They no longer have java or jni in their names. CHANGES file has complete list.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4890 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-11 19:52:27 +00:00
William S Fulton 10578504db Tweak for protected and private destructor wrapping
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4886 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-11 09:15:06 +00:00
William S Fulton 6b4726769b New typemaps csinterfaces_base and csinterfaces_derived replace
the javainterfaces typemap. Also fixes the peculiarity of all classes
in an inheritance chain individually deriving from the IDisposable
interface.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4884 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-10 23:09:47 +00:00
William S Fulton 191a2cc071 cildispose and cildisposeoverride typemaps replaced by
csdestruct_base and csdestruct_derived typemaps. The delete()
method has been removed and its functionality put into these
typemaps designed for the Dispose method.
New typemaps: csfinalize for finalizers.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-06-10 21:43:58 +00:00
William S Fulton da8d51c30b Fix for proxy class typemaps so that they use the C++ type and not the proxy class name.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4786 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-11 21:37:52 +00:00
William S Fulton 89e0c9b214 constants and enums are wrapped as C# constants rather than variables now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4663 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-04-03 15:31:19 +00:00
William S Fulton a9dd72b92d warning fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4634 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-27 00:33:41 +00:00
William S Fulton 93b9d5e23f Reserved word checking removed - a #define can be used in interface instead
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4583 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-19 23:02:51 +00:00
William S Fulton c201cb7376 vararg support for Java and C#
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4575 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-19 20:44:33 +00:00
William S Fulton 087fb8dba2 Global variables use properties instead of get and set functions.
All member variables working as properties.
pragma used for module class and pinvoke class import statements


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4539 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-15 22:47:28 +00:00
William S Fulton 3bd5ee539a Missing using System; statement in the module class, needed by mono compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4533 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-12 23:09:39 +00:00
William S Fulton a7bc7a6ba9 Virtual methods in C# proxy classes now use the appropriate keyword, virtual or override.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4526 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-12 20:42:52 +00:00
William S Fulton c172b2e5e6 Java module enhancements/bug fixes since the C# module was derived off the Java one.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4501 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-10 19:47:38 +00:00
Dave Beazley e19c73746d Enhancement to Swig_require(), Swig_save(), Swig_restore()
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4436 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-06 21:10:49 +00:00
William S Fulton 22faae5ec6 Remove package statement when using -package commandline. Perhaps this needs to be replaced by assemblies? Gets the test-suite under way for the moment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4430 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-04 22:35:29 +00:00
William S Fulton 6116a681bc gcc -Wall warnings fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4426 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-03 23:29:53 +00:00
William S Fulton 5e63459fd9 CSharp module. Neil Cawse version.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-03-03 20:26:07 +00:00
Tiger Feng 4721789c66 csharp module added
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4376 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-21 20:34:52 +00:00
Tiger Feng 876f9fa094 *** empty log message ***
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4375 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-02-21 19:39:27 +00:00