Charlie Savage
ee63d5276c
Updated Ruby Exception handling. Classes that are specified in throws clauses, or are marked as %exceptionclass, are now inherited from rb_eRuntimeError. This allows instances of these classes to be returned to Ruby as exceptions. Thus if a C++ method throws an instance of MyException, the calling Ruby method will get back a MyException object. To see an example, look at ruby/examples/exception_class.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8353 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-10 19:19:19 +00:00
Charlie Savage
7d44f269fb
Wrapped customer error classes in function so they work in C and C++
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8343 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-10 03:38:08 +00:00
Charlie Savage
7e96a9e2d5
Added SWIG_ObjectPreviouslyDeletedError for Ruby. This error happens when a Ruby object's underlying C++ object has been freed. This can happen if a Ruby/C++ object is put into a C++ container that then frees its objects when it goes out of scope, leaving a dangling reference in Ruby.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8340 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-10 00:52:37 +00:00
Charlie Savage
e3822ad9d4
Rearranged the code a bit to store a global reference to the Ruby hash table delete method, thereby making it possible to look it up once instead of each time SWIG_RubyRemoveTracking is called.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-10 00:30:43 +00:00
Charlie Savage
180a2372dc
Attemp #2 at defining rb_eNullReferenceError. This is done for C++, but for C
...
a more generic rb_eRuntimeError is thrown instead.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8333 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-09 22:17:06 +00:00
Charlie Savage
0fe0086def
Removed defining rb_eNullReferenceError since this doesn't work in C - it
...
causes a 'initializer element is not constant" error.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8326 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-09 20:11:37 +00:00
Charlie Savage
a023f56b0c
Removed duplicate definition of struct Guard.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8325 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-09 20:00:56 +00:00
Charlie Savage
384de7d10b
Added Ruby support for SWIG_NullReferenceError.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8324 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-09 19:43:26 +00:00
William S Fulton
742afce44c
_std_deque.i moved from Lib directory
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8304 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-08 20:17:06 +00:00
Marcelo Matus
e73b4e1036
fix typo
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8275 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-07 07:15:58 +00:00
Marcelo Matus
6e95b6433b
add macros/names to avoid numeric warning codes. use them in tcl,perl,ruby and python
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8274 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-07 06:59:32 +00:00
Marcelo Matus
69c14f087e
add initial stl.i to ensure proper file inclussion and extensions for each language
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8232 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 00:37:31 +00:00
Marcelo Matus
e222e63bc2
add stl.i files for each language to prevent improper includes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8229 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-06 00:27:12 +00:00
Marcelo Matus
d5cb3bbcb9
uniform cni examples
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8197 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-03 19:48:06 +00:00
Marcelo Matus
ae41da15df
better str_new
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8155 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-31 10:46:12 +00:00
Marcelo Matus
f3262ed3d9
better kw from Olly's comments
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8151 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-31 10:43:06 +00:00
Marcelo Matus
b4e4fe23ca
add tcl+java example
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8140 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-30 11:59:54 +00:00
Marcelo Matus
dc915a44a1
add jstring.i for ruby
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8138 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-30 10:51:35 +00:00
Marcelo Matus
e85a31e26d
fix missing __PTHREAD__
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8109 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-28 08:46:45 +00:00
Charlie Savage
e5443e3bd4
Fixes bug 1386579. When returning a vector of pointers, do not create
...
copies of the objects that are pointed to since they may not have
copy constructors. This also is more inline with returning a vector from a method
in C++ where the pointers are copied but not what they point to.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8083 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 19:56:35 +00:00
Charlie Savage
6c8dd53ee8
Reimplementation of tracking objects in Ruby. Instead of passing the $track flag to
...
the methods SWIG_Ruby_ConvertPtrAndOwn and SWIG_Ruby_NewPointerObj,
now tracking information is held on swig_class. This change reduces
significantly reduces the amount of code needed in ruby.cxx, is more robust, and is
more cohesive.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8082 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 18:02:51 +00:00
Marcelo Matus
32cbb57ab6
keep old typemap code in place, but disable, for readers to look around, and rescue other lost typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-13 23:46:37 +00:00
Marcelo Matus
abbf8b406a
more on the TypeQuery fix
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7971 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 23:53:53 +00:00
Marcelo Matus
ae761ca3ba
fix extra calls to TypeQuery for 'char *' and 'wchar_t *'
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7968 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 20:20:19 +00:00
Marcelo Matus
f222064ffd
fix for ruby -w
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-08 08:46:04 +00:00
Marcelo Matus
cdb2097cf5
add missing 'const'
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7881 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-27 02:30:45 +00:00
William S Fulton
cfdad24993
Use the system angle brackets for %include
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7871 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-26 09:28:20 +00:00
Marcelo Matus
cb4a1ff465
more speed ups
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7864 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-24 00:54:46 +00:00
Marcelo Matus
f3c24eff33
fixes for directors + pointers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-21 21:01:35 +00:00
Marcelo Matus
71df9fc8b6
add std_except typemaps to the unified typemap library
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7758 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-31 09:43:02 +00:00
Marcelo Matus
536621e82b
prevents ConvertPtr to modified the result when fails
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7757 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-31 09:41:43 +00:00
Marcelo Matus
8be1b7a07c
move attribute.i to the typemap library, now is usable from all the languages
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7717 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-25 13:20:50 +00:00
Marcelo Matus
e7eeff806a
eliminate compilation warnings, add docs, and centralize the access to the unified typemap library
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7710 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-25 09:31:15 +00:00
Marcelo Matus
3c65cea431
Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-24 14:59:05 +00:00
Marcelo Matus
2811e2a09a
include the user's fragment file in the same place
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7693 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-20 09:58:19 +00:00
Marcelo Matus
ba3efb0917
finishing the first stage of the typemap unification scheme, fixing issues with gcc and valgrind
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7692 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-20 09:47:56 +00:00
Marcelo Matus
7564088646
fix warnings/errors for gcc4.0, icc and valgrind
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7689 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-19 14:26:13 +00:00
Marcelo Matus
aadff06f45
more typemaps unification and fixes for valgrind
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7684 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-19 10:52:50 +00:00
Marcelo Matus
c0c3495ee4
cosmetic change, remove repeated docs
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7678 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-18 13:54:54 +00:00
Marcelo Matus
7e5e4fd1f9
massive typemap unification
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-18 13:24:15 +00:00
William S Fulton
ccb0e97955
const enum SWIGTYPE& fix
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7635 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-09 13:51:59 +00:00
Charlie Savage
2531e8d5f5
Fixed handling of char. This was needed due to changes in handling of %constants in ruby.cxx
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7625 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-08 19:51:51 +00:00
Charlie Savage
65a0a3b9f2
Fixed handling of constants. Previously if a %constant directive was defined before a #define it would not work correctly.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7578 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-03 19:47:06 +00:00
William S Fulton
da2a914365
Visual Studio warning fixes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7538 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-27 20:16:09 +00:00
Charlie Savage
8802ee4035
Added a typemap %typemap(in) (int LENGTH, char *STRING) that is simply the reverse of %typemap(in) (char *STRING, int LENGTH).
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7533 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-26 06:06:44 +00:00
William S Fulton
1018e6a484
Best attempt at missing directorin typemaps to fix director_wombat.i testcase. Could do with checking.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7506 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-23 22:56:30 +00:00
Charlie Savage
c5fd02ec59
Object tracking support. Defined two new pointer conversion flags used by SWIG_ConvertPtr and SWIG_NewPointerObj. The new flags are:
...
#define SWIG_POINTER_OWN 0x1
#define SWIG_TRACK_OBJECTS 0x4
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7496 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-23 18:04:06 +00:00
Charlie Savage
417127cedc
Support object tracking. Updated SWIG_NewPointerObj and SWIG_Ruby_ConvertPtr to take into account object tracking.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7495 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-23 18:03:05 +00:00
Charlie Savage
88fcc55de1
Support for object tracking. Includes new reference to "rubytracking.swg" and defines a new feature called "trackobjects"
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-23 18:01:57 +00:00
Charlie Savage
1a6a4deb2f
New include file that implements an API for tracking objects.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7493 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-23 17:49:31 +00:00