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
Gonzalo Garramuno
4ead0ce7b2
Removed python crap from std/std_common.i
...
and moved it to python/std_common.i
Consolidated ruby code to use std/std_common.i
Added missing include to rubystdfunctors.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 06:28:23 +00:00
Gonzalo Garramuno
a7aa62ce68
Added an implementation of std_queue with tests.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9779 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:25:58 +00:00
Gonzalo Garramuno
5e27a6828a
Added an implementation of std_stack.i with
...
proper tests.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9778 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 05:13:17 +00:00
Gonzalo Garramuno
0f15d298da
Modified ruby functors to remove ruby prefix.
...
Added new test for functors.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9776 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 04:08:55 +00:00
Gonzalo Garramuno
1cf8fd332b
Added constructor that can take functors to all
...
containers that can use one.
Created file rubystdfunctors.swg to allow passing in
Ruby procs as functors to STL functions (swig-user list
suggestion for Python).
Fixed a bug in type_info() always failing for std::set.
Fixed a bug in type_info() always accepting any failed
conversion which could lead to overloaded functions to
fail when input wrong parameters.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9775 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-06 03:56:33 +00:00
Gonzalo Garramuno
f92ebdbe07
remove std::set from new extended functions, as
...
it was failing due to non-assignable iterator.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9774 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-05 11:19:54 +00:00
Gonzalo Garramuno
1c46a18c50
Added new rubycontainer_extended.swg file.
...
This file contains standard ruby algorithms but
which place some restriction on the class inside
the STL container.
Fixed GC_VALUE so that it cannot be instantiated
from the language manually.
Fixed delete autodoc.
Started documenting each portion of the SWIG
templates/macros so it makes sense to people.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9773 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-05 10:26:59 +00:00
Gonzalo Garramuno
81c84b7e8c
Rename fixes to STL.
...
Removed object reporting in non-verbose from
newobject demos.
Made wstring treat them as normal strings as
advertised.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9771 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-05 00:46:20 +00:00
Gonzalo Garramuno
4cd98d3865
Improved algorithm of renaming of methods with numbers at the end.
...
Fixed some const issues.
Improved report on overloaded function error.
Fixed some minor iterator potential problems.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-04 13:12:31 +00:00
Gonzalo Garramuno
8e630bd57d
Refactored the overloaded method error into
...
a simple auxiliary function in a .swg file.
This makes the resulting .cxx files a little
bit less bloated.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-03 22:45:13 +00:00
Gonzalo Garramuno
7d570676f5
Better autodocs.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-03 09:56:28 +00:00
Gonzalo Garramuno
f8ee6e65fe
Updated Ruby manual to enhance section on the STL.
...
Fixed inspect() method on map and rubycontainer
not using inspect to print out elements.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-03 06:58:55 +00:00
Gonzalo Garramuno
c6ece2bb93
Made autodoc ignore numinputs=0.
...
Added more typemap(doc) for documenting STL
and standard ruby methods.
Added missing RUBY_SELF typemap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9754 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-02 22:09:06 +00:00
Gonzalo Garramuno
d3945a4d40
Improved autodoc documentation for standard ruby methods
...
and for STL containers, using %feature instead of
hard-coding the stuff in ruby.cxx.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9753 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-02 20:37:21 +00:00
Gonzalo Garramuno
594483bbda
STL stream support for Ruby.
...
docstring and autodoc support for Ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9750 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-02 10:00:26 +00:00
Gonzalo Garramuno
cea5ba04fa
Fixed last test in std_set test suite that was
...
failing due to having been done with old hash sort.
Improved rubycontainer a little bit. Made GC_VALUE
sort an rb_protect function to prevent bad sorting
attempt of an Array against a String.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9747 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-02 01:28:21 +00:00
Gonzalo Garramuno
1b349d4749
Fixed a bug with argout values being incorrectly
...
returned when the first argout/returned element
was an array.
Made std::pair and container returned elements be
frozen (like tuples in python).
Added the std_containers.i test from python and
created a ruby runme file for it.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9746 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 22:40:55 +00:00
Gonzalo Garramuno
3ccbac69aa
Fixed a problem with const correctness in new
...
adde std_pair.i functions.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9745 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 21:38:33 +00:00
Gonzalo Garramuno
68b52c4ee5
Added support for complex numbers.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9743 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 10:37:09 +00:00
Gonzalo Garramuno
eb4817c9ee
Added select() function to sequences.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9742 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 10:08:24 +00:00
Gonzalo Garramuno
fd964ef50c
std::set is now Enumerable once again.
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9741 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 10:00:14 +00:00
Gonzalo Garramuno
a6fa331dae
Fixed VALUE less compare function to be a good GC_VALUE
...
less compare function. This is used for hashing.
Moved the functor over to rubyclasses to avoid bloat
when GC_VALUE is not used.
Updated std::map test to check for equivalence.
Updated CHANGES.current a tad to move the STL
stuff as last and merge two feature updates as one.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 09:55:44 +00:00
Gonzalo Garramuno
8564ff90c0
Improved multimap, vector and set by rearranging
...
some methods.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 06:43:56 +00:00
Gonzalo Garramuno
c0a7c7e081
Added proper each(), printing and other methods to map
...
and multimap.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9733 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 05:43:30 +00:00
Gonzalo Garramuno
aa3c28e230
Yet even better swig assert.
...
Added more tests to std::vector for map.
Added dup() function to containers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9732 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 01:54:02 +00:00
Gonzalo Garramuno
293750eaea
Moved the GC_VALUE class over to rubystdcommon
...
so that it will only get added when STL is used.
Documented swig_assert interface.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9731 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 01:21:26 +00:00
Gonzalo Garramuno
a100f16bbd
Fixes to std_map and multimap. There's still a problem
...
of const correctness in the std swig STL library.
Need to bring it up in the swig-devel list.
Added new functions to swig_assert.
Changed some tests to reflect these changes.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-05-01 01:08:17 +00:00
Gonzalo Garramuno
8ea7856ef3
Improved GC_VALUE so it gets printed nicely
...
and works properly with std::pair.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9725 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-04-30 19:26:18 +00:00