Commit graph

293 commits

Author SHA1 Message Date
William S Fulton
67f5931952 Fix crashing in the Ruby reject method in the STL wrappers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10543 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-21 20:45:32 +00:00
William S Fulton
9c323f4a70 Add R keyword support. Rename keywords for successful compilation of Java and C# code. More consistent keyword warnings across the different languages.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10530 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-06-19 20:02:13 +00:00
William S Fulton
da8791792b STL fixes when using %import rather than %include and the Solaris Workshop compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10424 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-05-07 21:33:19 +00:00
William S Fulton
a91e4906b5 Add newmemory parameter for SWIG_TypeCast
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-10 00:35:11 +00:00
Gonzalo Garramuno
c7ec8c691d Made set_err false by default, as that gives a better overloaded
message.  Unfortunately, in ruby we cannot concatenate exception
messages as in python.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10213 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-19 04:41:46 +00:00
Gonzalo Garramuno
b673832720 Added more backwards compatibility macros from ruby1.9.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10199 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-04 03:47:55 +00:00
Gonzalo Garramuno
6120c93fc6 Added a couple of new macros used in ruby1.9.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10198 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-02 21:41:50 +00:00
William S Fulton
e659f506f1 Fix fragments in Ruby for old typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10166 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-23 00:00:39 +00:00
William S Fulton
5bbdad6a30 fix comments about fragments - noticed by Josh Cherry
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10158 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-11-20 21:45:06 +00:00
Gonzalo Garramuno
f2f29c9ba5 Moved the std::pair< iterator, bool > typemap to std_set.i
where it belongs.
This solves the problem with swig conflicts (at least for now).



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10071 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-29 22:12:56 +00:00
Gonzalo Garramuno
169a953991 Added fix for std::pair< iterator, bool >.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10070 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-29 16:39:05 +00:00
Gonzalo Garramuno
c568d170dc Added an additional fix to std_set to handle erase
properly (sigh).
Fixed a comment in rubyiterators.swg.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10056 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-27 21:58:36 +00:00
Gonzalo Garramuno
7bc4e56614 Added new typemap and function to turn a
std::set<T>::iterator and std::multiset<T>::iterator
into a ruby const iterator so that the key value
cannot be changed.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10055 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-27 21:41:22 +00:00
William S Fulton
c6b4403b40 remove dead code
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10053 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 10:22:40 +00:00
William S Fulton
145c1f42b8 Fix invalid C
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10048 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 00:40:18 +00:00
William S Fulton
c01ba3666c more signed / unsigned mismatch fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10047 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 00:31:01 +00:00
William S Fulton
bee6b6650f signed / unsigned mismatch fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10046 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-26 00:23:58 +00:00
William S Fulton
fb6586ecdf Fix unary minus warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10045 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-25 23:52:35 +00:00
William S Fulton
1c163430e3 Fixes global namespace pollution from Ruby\'s win32.h
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10044 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-25 23:45:44 +00:00
Gonzalo Garramuno
94a6b8ddb1 Revered _mSWIG to rubyhead.swg as some tests would fail.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9931 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-04 06:43:28 +00:00
Gonzalo Garramuno
d1defceb95 Moved _mSWIG to rubyrun.swg with all other static
variables.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9927 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-04 06:12:38 +00:00
Gonzalo Garramuno
8f6e08dcb5 Silly gcc was complaining about static initializers when
compiling in C.
Code was now moved to initialization and variables were
prefixed with swig_*.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-09-04 05:40:49 +00:00
Gonzalo Garramuno
bbd80cfa84 Moved some of the common checks for methods/procs and arity
to rubyrun.swg, as they are useful even for not stl stuff.

Added a fragment trait for marking STL containers, but this
fragment cannot be attached due to SWIG %template limitations.




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-07-24 05:46:55 +00:00
Gonzalo Garramuno
a1ed3e094a Fixed C++ comment in potential C file.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9858 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-25 21:43:43 +00:00
Gonzalo Garramuno
aa84817ce0 Fixed typo.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9855 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-11 20:03:19 +00:00
Olly Betts
333ed5b82d Using an apostrophe in a #error message causes an error for some GCC versions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9853 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-06 23:20:25 +00:00
Olly Betts
1329624117 [Ruby]
Use whichever of "long" or "long long" is the same size as "void*"
to hold pointers as integers, rather than whichever matches off_t.
Fixes compilation on OS X and GCC warnings on platforms where
sizeof(void*) < sizeof(off_t) (SF patch #1731979).


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9852 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-06 21:25:32 +00:00
Gonzalo Garramuno
8a0eba9469 Changed "extern Init_stack" to "RUBY_EXTERN" to make it compatible
with ruby on windows (dllexport issues).



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9845 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-02 10:41:38 +00:00
Gonzalo Garramuno
801fda2b00 Moved Init_stack() declaration over to rubyapi to
avoid potential C++ issues.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9844 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-06-02 10:24:23 +00:00
Gonzalo Garramuno
32b10ee9b7 Dramatically sped up comparison functions for
integers.  This speeds up most std::set<int>, etc.
insertion operations.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-23 12:46:57 +00:00
Gonzalo Garramuno
776398cd1d Made hash store a counter to the ruby VALUE object.
This should avoid a potential subtle bug when
using operator=.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9829 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-23 11:54:36 +00:00
Gonzalo Garramuno
5aaf3003b6 Added a partial specialization for swig::GC_VALUE
to avoid the need to check each element in the container
during copy constructors.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9828 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-20 15:23:43 +00:00
Gonzalo Garramuno
0b36bc6940 Removed & test and changed it for a simpler T_NONE
test.  This seems to avoid issues and is slightly
faster.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9827 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-19 16:51:39 +00:00
Gonzalo Garramuno
7c2e64a8dd Made check in rubyclasses a little bit safer
to exit early on ints, nil, false, true, symbols,
internal nodes and none.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9825 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-19 09:41:23 +00:00
Gonzalo Garramuno
1cf8d3dd36 Dramatically sped up all STL containers when
they contain swig::GC_VALUEs.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9824 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-19 08:45:09 +00:00
Gonzalo Garramuno
cf0e8cca5a Fixed typecheck for std::complex<double>
which was previously broken.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9817 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-17 11:10:27 +00:00
Gonzalo Garramuno
211ee4eb0a Fix for std::pair< iterator, iterator > making the
iterator non-consts, when the key is always const
and will prevent modification.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9816 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-17 10:28:20 +00:00
Gonzalo Garramuno
b20fd0d06f Moved functors away from std_set.i and std_map.i
into their own std_functors.i file.
Made binarypredicate, etc. be templates to allow more
strict predicates/functors.




git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9815 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 22:48:01 +00:00
Gonzalo Garramuno
765e3d27f0 Removed incorrect noconst trait.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9814 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 22:25:31 +00:00
Gonzalo Garramuno
72b118220f Added some spaces in template names to avoid
potential compilation errors.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9812 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 21:29:34 +00:00
Gonzalo Garramuno
361a5d67b4 Removed older renames.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9811 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 21:28:20 +00:00
Gonzalo Garramuno
d4eec2670b Fixed renames of std_* containers to a safer
%rename directive.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9810 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 21:27:08 +00:00
Gonzalo Garramuno
50c035fb07 Ruby complex was broken for one of its constructors.
Fixed.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9809 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-16 21:24:41 +00:00
Gonzalo Garramuno
d162646475 Fixed swig::ConstIterator to use a GC_VALUE
instead of a normal value.
Fixed container iterator typemaps to pass self
in as sequence (this makes iterator print itself ok)
Fixed typo in rubycomplex comment.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9790 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-08 10:11:41 +00:00
Gonzalo Garramuno
6b68617166 Removed debugging printf.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9789 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-07 20:05:20 +00:00
Gonzalo Garramuno
9ced69968f Fixed ruby's complex conversion.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9788 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-07 20:03:37 +00:00
Gonzalo Garramuno
315bd2da6e Added new iterator changes to std.
This change does not break backwards compatability
with python, so all works.
The python stuff, however, will still not do all
that ruby can now do.
Updated manual to reflect the change and improve
typemap documentation on the ruby side.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9787 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-07 05:00:46 +00:00
Gonzalo Garramuno
c18feb2af3 Fixed type_name of some std classes.
Remove cmp_id from GC_VALUE.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9784 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 12:46:40 +00:00
Gonzalo Garramuno
949b6238e8 Fixed small typo in comment.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9783 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 07:43:36 +00:00
Gonzalo Garramuno
ddbce633fd Removed std::less functor and redefined all operators
for GC_VALUE instead.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 07:38:38 +00:00