summaryrefslogtreecommitdiff
path: root/Source/Modules/ruby.cxx
Commit message (Collapse)AuthorAgeFilesLines
* Fix ODR violationsOlly Betts2021-09-201-0/+2
| | | | Detected by compiling with GCC flags `-flto -Wodr`.
* Remove support for $source and $targetOlly Betts2021-04-301-28/+4
| | | | | | | | These were officially deprecated in 2001, and attempts to use them have resulted in a warning (including a pointer to what to update them to) for most if not all of that time. Fixes #1984
* Improve description of cast macros for RubyThomas Reitmayr2020-01-041-7/+5
| | | | | | | | | The macros for casting function pointers are now fully described and also clarify why the macros act transparently for C even before Ruby 2.7. In addition, an "if (CPlusPlus)" was removed in the code generator for global variables in order to keep the distinction between C and C++ in one place, which is at the definition of said macros.
* Move new macros for Ruby to their dedicated namespaceThomas Reitmayr2020-01-031-1/+1
|
* Add support for Ruby 2.7Thomas Reitmayr2019-12-311-13/+9
| | | | | | | | | | | | This commit fixes the signatures of various callback methods and cleans up the macro definitions used for casting callbacks. Note that the transparent version of the macro RUBY_METHOD_FUNC is currently masked behind RUBY_DEVEL, see commit https://github.com/ruby/ruby/commit/1d91feaf13e0ffe04b2dabc6e77e4101b6d0bb07 In order to still support strict signature checking and prevent nasty deprecation warnings, the use of RUBY_METHOD_FUNC had to be replaced with VALUEFUNC.
* Fix code generated for Ruby global variablesThomas Reitmayr2019-10-271-10/+26
| | | | | | This commit fixes swig#1653 by creating a Ruby virtual variable for a C/c++ global variable when SWIG is invoked with the -globalmodule option.
* Harmonize parameters in autodoc in Ruby and Octave with PythonVadim Zeitlin2019-01-211-10/+12
| | | | | | | | Backport changes to Python version of make_autodocParmList() to Ruby and Octave modules, which use similar code. In particular, this improves handling of parameters clashing with the language keywords/reserved words for these languages as well.
* Fix Ruby docstring feature.William S Fulton2019-01-051-24/+13
| | | | | | | | | | | | The docstring was not encapsulated within /* */ comments. The implementation had code for autodoc strings being either single or multi-line and then adding extra newlines. However, in practice only multi-line autodoc string are ever generated, so this bit of code handling was removed. The docstring feature does not attempt to add newlines depending on the existence of newlines in the docstring. Closes #538
* Remove -cppcast and -nocppcast command line optionsWilliam S Fulton2018-11-131-14/+7
| | | | | | | | | | | | | The -cppcast option is still turned on by default. The -nocppcast option to turn off the use of c++ casts (const_cast, static_cast etc) has been removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts instead of C++ casts for C++ wrappers. This a revert of commit fc79264a48f186f8bbd367e91fa9dbf9758aa092: "Revert "Remove -cppcast and -nocppcast command line options"" The Scilab and Javascript casting problems are now fixed, so -cppcast is now switched on as default.
* Revert "Remove -cppcast and -nocppcast command line options"William S Fulton2018-11-061-7/+14
| | | | | | This reverts commit c06f2b4497bffeb185dbf0e65dc925514537ef37. More work to be done as it breaks Scilab and Javascript tests.
* Remove -cppcast and -nocppcast command line optionsWilliam S Fulton2018-11-061-14/+7
| | | | | | | The -cppcast option is still turned on by default. The -nocppcast option to turn off the use of c++ casts (const_cast, static_cast etc) has been removed. However, defining SWIG_NO_CPLUSPLUS_CAST will still generate C casts instead of C++ casts for C++ wrappers.
* Misc. typosluz.paz2018-05-171-1/+1
| | | found via `codespell` and `grep`
* Merge branch 'goatshriek-ruby-alias'William S Fulton2018-04-071-1/+7
|\ | | | | | | | | * goatshriek-ruby-alias: Fix ruby %alias directive for native c functions
| * Fix ruby %alias directive for native c functionsJoel Anderson2018-03-221-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using the %alias directive on native C functions causes swig to segfault due to a dereference of klass (which is NULL for native C functions) in the defineAliases function of the Ruby module. This commit adds support for an alias of native C functions for both separate module as well as global functions, as well as three test cases for the %alias directive of the Ruby module. Fixes: mod.i %module ruby_alias %alias get_my_name "nickname,fullname"; %inline %{ const char *get_my_name(){ return "Chester Tester"; } %} $ swig -ruby mod.i Segmentation fault Signed-off-by: Joel Anderson <joelanderson333@gmail.com>
* | [Ruby] Pass Qnil instead of NULL to rb_funcall()Olly Betts2018-04-031-1/+1
|/ | | | | This silences GCC -Wconversion-null warning (on by default with recent GCC).
* Generation of director method declarations fixesWilliam S Fulton2017-10-231-4/+4
| | | | | | | - Fixes generation of director method declarations containing C++11 ref-qualifiers. - Fixes generation of director method declarations returning more complex types such as const ref pointers. - Rewrite Swig_method_call to use more up to date code in the core.
* Enhancements for directorin typemapsWilliam S Fulton2017-10-161-1/+1
| | | | | | | | | The directorin typemaps will now generate a temporary variable (specified after the type), such as: %typemap(directorin) MyType (MyType *temp) { ... use temp ... } The shared_ptr director typemaps have been fixed for use in functions that take more than one parameter.
* Fix potential use of uninitialized variables in directorsWilliam S Fulton2017-05-131-3/+13
|
* #526 : propagate c++11 noexcept to director classesChristophe Duvernois2017-04-271-0/+4
|
* Fix GCC 7 warningsOlly Betts2016-12-211-2/+1
| | | | From -Wimplicit-fallthrough which is now enabled by -W.
* Fix "set but not used" warningOlly Betts2016-12-131-1/+1
|
* Remove unused kwnames generated variable in Ruby wrappersWilliam S Fulton2016-05-281-1/+3
| | | | This seems to be from some left over Python kwargs / unfinished kwargs support
* Merge branch 'tamuratak-master'William S Fulton2016-05-171-5/+6
|\ | | | | | | | | | | * tamuratak-master: Revert introduction of minor memory leak in Ruby wrappers ruby: use nodeType attribute to determine whether functions are constructors. get return type each time.
| * Revert introduction of minor memory leak in Ruby wrappersWilliam S Fulton2016-05-171-1/+5
| |
| * ruby: use nodeType attribute to determine whether functions are constructors.Takashi Tamura2016-04-081-5/+2
| | | | | | | | get return type each time.
* | Merge branch 'ruby-module-docstring'William S Fulton2016-05-171-0/+12
|\ \ | |/ |/| | | | | | | * ruby-module-docstring: Ruby module docstring avoid memory leak Ruby add support for docstring option in %module()
| * Ruby module docstring avoid memory leakAurelien Jacobs2016-01-121-2/+4
| |
| * Ruby add support for docstring option in %module()Aurelien Jacobs2016-01-111-0/+10
| | | | | | | | This was already documented but not actually implemented.
* | Multiple inheritance warning wording tweakWilliam S Fulton2016-03-061-1/+1
| |
* | Fix typo: "neccessary" -> "necessary"Olly Betts2016-01-121-1/+1
|/
* Alternative solution for Ruby unbalanced bracesWilliam S Fulton2016-01-101-5/+4
|
* Ruby fix unbalanced braces causing issue with the YARD parserAurelien Jacobs2016-01-091-0/+3
|
* Prevent redefinition warnings when compiling with SWIG<module> definedPetre Eftime2015-12-221-2/+1
| | | | Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
* Ruby shared_ptr fixes for use with minheritWilliam S Fulton2015-10-011-10/+8
|
* Fix Ruby smartptr feature for classes in a namespaceWilliam S Fulton2015-09-251-2/+3
|
* Add Ruby shared_ptr supportWilliam S Fulton2015-09-251-5/+31
|
* Ruby free function declaration changeWilliam S Fulton2015-09-141-1/+3
| | | | | Declare function taking void * parameter to be more flexible for upcoming smart pointer support.
* Fix ruby warning using clang in director exception codeWilliam S Fulton2015-08-311-0/+1
| | | | | | | | Suppresses warning: error: control may reach end of non-void function [-Werror,-Wreturn-type] The UNUSED macro is not expanded in ruby.h for rb_exc_raise for clang when it ought to be. For patch #512
* gcc-5.1 warning fixesWilliam S Fulton2015-04-261-4/+2
|
* Fix C&P references to Python in commentsOlly Betts2015-03-271-2/+2
|
* Create director_common.swg for language-indep codeOlly Betts2015-03-121-0/+1
| | | | | Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for all languages with director support, not just Python and PHP.
* The kwargs feature no longer turns on compactdefaultargs for languages that ↵William S Fulton2014-10-211-0/+8
| | | | | | | | don't support kwargs. Affects all languages except Python and Ruby. Closes #242
* Eliminate needless casting away const from string constantsOlly Betts2014-04-301-2/+2
|
* Merge branch 'master' into gsoc2009-matevzWilliam S Fulton2013-10-101-6/+2
|\ | | | | | | | | | | | | | | | | | | Conflicts: Examples/Makefile.in Examples/guile/Makefile.in Lib/php/php.swg Makefile.in Source/CParse/parser.y configure.ac
| * Fix a const_cast in generated code that was generating a <:: digraph when ↵William S Fulton2013-07-011-1/+1
| | | | | | | | | | | | | | | | using the unary scope operator (::) (global scope) in a template type. Affects Python, Ruby, Ocaml. Based on SF patch #341.
| * Apply patch SF #334 - Fix Python default value conversions TRUE->True, ↵William S Fulton2013-01-291-5/+1
| | | | | | | | FALSE->False.
* | Merge branch 'master' into gsoc2009-matevzWilliam S Fulton2013-01-281-280/+296
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parser.y still to be fixed up Conflicts: Doc/Devel/engineering.html Examples/Makefile.in Lib/allegrocl/allegrocl.swg Lib/csharp/csharp.swg Lib/csharp/enums.swg Lib/csharp/enumsimple.swg Lib/csharp/enumtypesafe.swg Lib/java/java.swg Lib/python/pydocs.swg Lib/r/rtype.swg Source/Include/swigwarn.h Source/Modules/octave.cxx Source/Modules/python.cxx Source/Modules/ruby.cxx Source/Swig/scanner.c Source/Swig/stype.c Source/Swig/swig.h configure.ac
| * Remove cvs/svn Id stringsWilliam S Fulton2013-01-121-2/+0
| |
| * Remove some unused code and pointless variable assignmentsWilliam S Fulton2012-11-231-5/+1
| | | | | | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
| * Remove unnecessary null checks or fix potential null dereferencesWilliam S Fulton2012-11-201-9/+11
| | | | | | | | git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13925 626c5289-ae23-0410-ae9c-e8d60b6d4f22