summaryrefslogtreecommitdiff
path: root/Lib/ruby/rubyrun.swg
Commit message (Collapse)AuthorAgeFilesLines
* Add Ruby support for std::unique_ptr inputsWilliam S Fulton2022-07-171-1/+10
| | | | Equivalent to Java/C#/Python implementations.
* Fix Ruby 3.2 warning "undefining the allocator of T_DATA class ↵Robin Stocker2022-04-121-0/+1
| | | | | | | | | | | | | | | | | | | 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.
* Ruby: Fix warnings in generated code about missing parameter in variadic macroThomas Reitmayr2022-01-291-1/+1
| | | | | | | | | | | | | | 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).
* fix #1199Viktor Gal2020-02-011-0/+2
|
* [ruby] check whether object is of RTypedData using RTYPEDDATA_P.Takashi Tamura2019-02-221-2/+2
|
* Fix overloading for non-pointers and NULL - RubyWilliam S Fulton2018-12-291-1/+1
|
* Fix various comment and documentation typosOlly Betts2017-08-131-1/+1
|
* Add assert for invalid NULL type parameter when calling SWIG_Ruby_NewPointerObj.William S Fulton2017-04-201-4/+5
| | | | Closes #935
* [ruby] must not do null check for VALUE obj, which can be 0x0 == Qfalse, a ↵Takashi Tamura2017-03-061-1/+1
| | | | valid Ruby object.
* Ruby opaque pointer handling regression fixWilliam S Fulton2016-05-241-4/+8
| | | | | | | | | | | | 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
* Fixes for Ruby and using -Wmissing-field-initializersWilliam S Fulton2015-12-191-1/+1
|
* SWIG_Ruby_ConvertPtrAndOwn changes for smartptr featureWilliam S Fulton2015-09-251-15/+21
| | | | | | | | | | 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 ownership refactor ready for smart pointersWilliam S Fulton2015-09-141-11/+16
| | | | | ruby_owntype replaced with swig_ruby_owntype which contains a member own for forthcoming smart pointer support.
* Fix some gcc -Wall unused warnings in the Ruby wrappersWilliam S Fulton2013-10-181-2/+1
| | | | Fixes SF bug 1333.
* Ruby 1.9 fixes.William S Fulton2013-04-051-2/+2
| | | | | | | | | | | | 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.
* Fix for gcc warning -Wunused-value without triggering -Wunused-parameterWilliam S Fulton2012-09-071-2/+2
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13735 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Apply patch #3517769 from Robin Stocker to fix compile error on MacRuby ↵William S Fulton2012-04-141-1/+1
| | | | | | using RSTRING_PTR git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12980 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* SWIG license change - The Examples and Lib move to a very permissive license ↵William S Fulton2010-02-271-3/+0
| | | | | | 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
* Various ruby-1.9.x compile fixes including patch from NibbleWilliam S Fulton2010-02-131-1/+1
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11862 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* gcc-4.4 warning fix for rubyWilliam S Fulton2009-12-121-1/+1
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11781 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Add newmemory parameter for SWIG_TypeCastWilliam S Fulton2008-02-101-1/+5
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10240 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Revered _mSWIG to rubyhead.swg as some tests would fail.Gonzalo Garramuno2007-09-041-3/+2
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9931 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Moved _mSWIG to rubyrun.swg with all other staticGonzalo Garramuno2007-09-041-2/+6
| | | | | | | | variables. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9927 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Silly gcc was complaining about static initializers whenGonzalo Garramuno2007-09-041-6/+7
| | | | | | | | | | 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
* Moved some of the common checks for methods/procs and arityGonzalo Garramuno2007-07-241-0/+36
| | | | | | | | | | | | 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
* Added constructor that can take functors to allGonzalo Garramuno2007-05-061-12/+0
| | | | | | | | | | | | | | | | 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
* Rename fixes to STL.Gonzalo Garramuno2007-05-051-5/+5
| | | | | | | | | | | 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
* Improved algorithm of renaming of methods with numbers at the end.Gonzalo Garramuno2007-05-041-0/+13
| | | | | | | | | | 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
* Better autodocs.Gonzalo Garramuno2007-05-031-6/+0
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Minor cleanup. Mode RUBY_INIT_STACK macroGonzalo Garramuno2007-04-291-12/+5
| | | | | | | | | 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
* Fixed typo for RUBY_EMBEDDED.Gonzalo Garramuno2007-04-291-1/+1
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Added support to avoid swig director type mismatch errorsGonzalo Garramuno2007-04-291-3/+12
| | | | | | | | on embedded ruby. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9702 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Improved ruby trackings across DSOs, removing theGonzalo Garramuno2007-04-291-2/+4
| | | | | | | | need for -DSWIG_EXTERN. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9699 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Fixed ruby's newobject1 and newobject2 demos.Gonzalo Garramuno2007-04-281-4/+34
| | | | | | | | | | 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
* Support building with recent versions of the Ruby 1.9 development branch.Olly Betts2006-09-231-1/+1
| | | | | | | Fixes bug #1560092. git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9333 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* cosmeticsWilliam S Fulton2006-03-071-7/+3
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Common template for head of each file detailing licence, distribution and ↵William S Fulton2006-03-071-1/+7
| | | | | | authors information git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8973 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Fixed a bug in Ruby's object tracking functionality. Previously, an object ↵Charlie Savage2006-02-221-1/+10
| | | | | | 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
* fix seg. fault for void typesMarcelo Matus2006-02-031-0/+3
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* fix -external-runtime and warning arounds in subversionMarcelo Matus2006-02-011-1/+26
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8666 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Added SWIG_POINTER_EXCEPTION for backwards compatibility.Charlie Savage2006-01-131-0/+3
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8422 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Added SWIG_ObjectPreviouslyDeletedError for Ruby. This error happens when a ↵Charlie Savage2006-01-101-3/+4
| | | | | | 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
* Reimplementation of tracking objects in Ruby. Instead of passing the $track ↵Charlie Savage2005-12-271-28/+33
| | | | | | | | | | | | 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
* fix for ruby -wMarcelo Matus2005-12-081-0/+7
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7948 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* fixes for directors + pointersMarcelo Matus2005-11-211-6/+25
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* prevents ConvertPtr to modified the result when failsMarcelo Matus2005-10-311-3/+5
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7757 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* Perl added to the Unified typemap library, cleaner way to use the library, ↵Marcelo Matus2005-10-241-6/+6
| | | | | | and 'normalized' macro names git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* finishing the first stage of the typemap unification scheme, fixing issues ↵Marcelo Matus2005-10-201-19/+25
| | | | | | with gcc and valgrind git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7692 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* more typemaps unification and fixes for valgrindMarcelo Matus2005-10-191-1/+1
| | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7684 626c5289-ae23-0410-ae9c-e8d60b6d4f22
* massive typemap unificationMarcelo Matus2005-10-181-0/+289
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22