| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Equivalent to Java/C#/Python implementations.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
swig_runtime_data"
Ruby 3.2 (still in development) started warning about this, see
https://bugs.ruby-lang.org/issues/18007.
Note that the extension docs mention it in
https://ruby-doc.org/core-3.1.1/doc/extension_rdoc.html#label-C+struct+to+Ruby+object:
> The klass argument is the class for the object. The klass should
> derive from `rb_cObject`, and the allocator must be set by calling
> `rb_define_alloc_func` or `rb_undef_alloc_func`.
So in this case we call `rb_undef_alloc_func` to fix the warning.
Verified that this works in robinst/taglib-ruby#115.
Fixes #2257.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The Ruby C API function 'rb_funcall' is used in various places in generated
code for invoking a Ruby method without parameters. The C function uses a
variadic parameter list for the arguments passed to Ruby, therefore in these
cases the list of variadic parameters is empty.
As an optimization Ruby may implement the 'rb_funcall' function as a macro
which however will not accept an empty list of arguments for '...' as of
C99 and C++11.
In order to prevent compiler warnings, this commit replaces all such
occurrences with a call to 'rb_funcall2' (which in its current name
'rb_funcallv' is invoked by the 'rb_funcall' macro anyway, at least for
Ruby 2.6.6).
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
Closes #935
|
|
|
|
| |
valid Ruby object.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug was introduced in swig-3.0.8 in #146252 adding shared_ptr
support. An ObjectPreviouslyDeleted error was incorrectly thrown
when the pointer was used as a parameter after being set to zero
via a call to 'DATA_PTR(self) = 0'.
It isn't clear to me which approach is better in this corner case,
so I've gone for backwards compatibility and restored the old behaviour.
Closes #602
|
| |
|
|
|
|
|
|
|
|
|
|
| |
rb_obj_is_kind_of can no longer be used for type checking as the
smartptr feature type, eg shared_ptr<Derived> cannot be cast to
a smartptr of the base class, eg shared_ptr<Base>.
Previously Derived could be cast to Base as they were in an
inheritance chain and the call to rb_define_class_under() used
SWIGTYPE_p_Base->clientdata for all derived classes.
Now SWIG_TypeCheck is always used.
|
|
|
|
|
| |
ruby_owntype replaced with swig_ruby_owntype which contains a member own
for forthcoming smart pointer support.
|
|
|
|
| |
Fixes SF bug 1333.
|
|
|
|
|
|
|
|
|
|
|
|
| |
SF Bug#1292 - Runtime fixes for Proc changes in ruby-1.9 when using STL wrappers that override the default predicate, such as:
%template(Map) std::map<swig::LANGUAGE_OBJ, swig::LANGUAGE_OBJ, swig::BinaryPredicate<> >;
Fixes li_std_functors testcases for Ruby 1.9.
Also rb_respond_to return values have changed subtely in 1.9 and return should be treated as a flag instead of checking for Qtrue, see SF Bug #1159.
Also fix li_std_map, li_std_set silently failing - rb_protect behaviour seems to have changed when an exception is thrown, so code has been changed to use rb_rescue. A call to 'rb_set_errinfo(Qnil)' could have solved this after the rb_protect call, but it is only available in 1.9+ and Ruby API changes are not easily and transparently detectable.
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
using RSTRING_PTR
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
in the LICENSE file, removing the BSD license restrictions as agreed by committers since it was inadvertently introduced. Remove some examples where the impact of the license change is not clear.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9931 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
| |
variables.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9927 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
| |
definition to rubyhead.swg where all the backward
compatability macros are kept.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9715 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
| |
on embedded ruby.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
| |
need for -DSWIG_EXTERN.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
|
|
|
| |
Added swig_assert.rb and started using it in some tests.
Added my patches to ruby.cxx, rubyrun.swg, rubystrings.swg
and rubytracking.swg [see: sourceforge]
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9691 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
|
| |
Fixes bug #1560092.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9333 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
authors information
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
could be returned even if it did not have the correct type. This could occur if a factory class' creation method had a signature returning a base type (like geometry) but in reality a subclass (like Point) was returned. In that case, it would then be impossible to implement a "downcast" method and get back a Ruby object of type Point. Also updated the test-suite to test this situation.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8861 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7757 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
and 'normalized' macro names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
|
|
| |
with gcc and valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7692 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
|
|
| |
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7684 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|
|
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
|