Commit Graph

244 Commits

Author SHA1 Message Date
Olly Betts 7a3cfdb013 Fix GCC 7 warnings
From -Wimplicit-fallthrough which is now enabled by -W.
2016-12-21 13:05:20 +13:00
Olly Betts f474577d5b Fix "set but not used" warning 2016-12-13 13:58:51 +13:00
William S Fulton a91d1b5a42 Remove unused kwnames generated variable in Ruby wrappers
This seems to be from some left over Python kwargs / unfinished kwargs support
2016-05-28 00:45:24 +01:00
William S Fulton 70f5a9ceed Merge branch 'tamuratak-master'
* 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.
2016-05-17 20:05:20 +01:00
William S Fulton 1330337491 Revert introduction of minor memory leak in Ruby wrappers 2016-05-17 20:04:24 +01:00
William S Fulton 38f8fd811c Merge branch 'ruby-module-docstring'
* ruby-module-docstring:
  Ruby module docstring avoid memory leak
  Ruby add support for docstring option in %module()
2016-05-17 19:04:20 +01:00
Takashi Tamura 7ef1b04a86 ruby: use nodeType attribute to determine whether functions are constructors.
get return type each time.
2016-04-08 12:15:55 +09:00
William S Fulton 21ee09fc19 Multiple inheritance warning wording tweak 2016-03-06 10:45:39 +00:00
Olly Betts f910607e26 Fix typo: "neccessary" -> "necessary" 2016-01-12 13:37:39 +13:00
Aurelien Jacobs 2daf3fa237 Ruby module docstring avoid memory leak 2016-01-12 01:05:10 +01:00
Aurelien Jacobs c63562744b Ruby add support for docstring option in %module()
This was already documented but not actually implemented.
2016-01-11 16:33:26 +01:00
William S Fulton 2d094d7d9f Alternative solution for Ruby unbalanced braces 2016-01-10 20:19:35 +00:00
Aurelien Jacobs 982b14370f Ruby fix unbalanced braces causing issue with the YARD parser 2016-01-09 21:14:59 +01:00
Petre Eftime 0a07cd4c30 Prevent redefinition warnings when compiling with SWIG<module> defined
Signed-off-by: Petre Eftime <petre.p.eftime@intel.com>
2015-12-22 14:33:21 +02:00
William S Fulton e12277a469 Ruby shared_ptr fixes for use with minherit 2015-10-01 22:36:01 +01:00
William S Fulton 14e1c47288 Fix Ruby smartptr feature for classes in a namespace 2015-09-25 22:58:00 +01:00
William S Fulton c482637167 Add Ruby shared_ptr support 2015-09-25 22:57:59 +01:00
William S Fulton 4d4c7eca9a Ruby free function declaration change
Declare function taking void * parameter to be more flexible for upcoming
smart pointer support.
2015-09-14 07:19:57 +01:00
William S Fulton 567d4690cf Fix ruby warning using clang in director exception code
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
2015-08-31 14:05:31 +01:00
William S Fulton d64c241e1c gcc-5.1 warning fixes 2015-04-26 01:18:26 +01:00
Olly Betts 01d0ee86e0 Fix C&P references to Python in comments 2015-03-27 12:40:42 +13:00
Olly Betts 7ba0652677 Create director_common.swg for language-indep code
Move -DSWIG_DIRECTOR_STATIC handling there, so this is now supported for
all languages with director support, not just Python and PHP.
2015-03-12 19:51:11 +13:00
William S Fulton bfde148887 The kwargs feature no longer turns on compactdefaultargs for languages that don't support kwargs.
Affects all languages except Python and Ruby.

Closes #242
2014-10-21 07:34:51 +01:00
Olly Betts 36be36d618 Eliminate needless casting away const from string constants 2014-04-30 12:00:23 +12:00
William S Fulton bcb7aee022 Merge branch 'master' into gsoc2009-matevz
Conflicts:
	Examples/Makefile.in
	Examples/guile/Makefile.in
	Lib/php/php.swg
	Makefile.in
	Source/CParse/parser.y
	configure.ac
2013-10-10 07:26:09 +01:00
William S Fulton 779dc402b6 Fix a const_cast in generated code that was generating a <:: digraph when using the unary scope operator (::) (global scope) in a template type.
Affects Python, Ruby, Ocaml.

Based on SF patch #341.
2013-07-01 20:00:12 +01:00
William S Fulton d172e3d0ed Apply patch SF #334 - Fix Python default value conversions TRUE->True, FALSE->False. 2013-01-29 07:31:11 +00:00
William S Fulton e805d5f925 Merge branch 'master' into gsoc2009-matevz
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
2013-01-28 07:01:37 +00:00
William S Fulton 7841a0d097 Remove cvs/svn Id strings 2013-01-12 01:21:16 +00:00
William S Fulton 0d2c459046 Remove some unused code and pointless variable assignments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-23 07:38:00 +00:00
William S Fulton 5b4ba0b0d6 Remove unnecessary null checks or fix potential null dereferences
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-20 23:29:57 +00:00
William S Fulton 0b0d5b1124 Fix uninitialised member var
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13909 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-19 19:41:12 +00:00
William S Fulton d918bddfc0 Fix segfaults when using filename paths greater than 1024 characters in length - use String * and heap instead of fixed size static char array buffers.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13904 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-18 00:45:18 +00:00
William S Fulton fd24b188e2 Fix Coverity 'Uninitialized pointer fields' - member variables are now initialized
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13887 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:17:28 +00:00
William S Fulton 5a1e82a2f4 Remove DohClose (Close) and replace with calls to DohDelete (Delete) to fix some minor memory leaks in most uses of NewFile.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13885 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-11-14 22:16:07 +00:00
William S Fulton b1ee062d2a Cosmetic variable renaming for consistency across language modules
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13874 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:38:05 +00:00
William S Fulton f6229d4b73 Fix director typemap searching so that a typemap specified with a name will be correctly matched. Previously the name was ignored during the typemap search. Implemented by ensuring the 'type' attribute in the Node is set up correctly and using the usual Swig_typemap_lookup on the Node.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@13873 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-10-27 17:37:34 +00:00
William S Fulton ecac2d2a68 Improve nullptr constant wrapping
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2009-matevz@13842 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2012-09-20 19:09:38 +00:00
William S Fulton 5d678a7b09 Fix regression introduced in r12784
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12883 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-22 21:14:09 +00:00
William S Fulton a5f8ffba91 Remove warning: 'self' is a ruby keyword, renaming to 'C_self' since improving autodoc for Ruby
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12882 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-21 22:01:27 +00:00
William S Fulton 468ca084fc Correct special variables in 'directorargout' typemap. This change will break any 'directorargout' typemaps you may have written. Please change: to and to \n Also fix the named 'directorargout' DIRECTOROUT typemaps for these languages which didn't previously compile and add in , etc expansion.\n [C#, Go, Java, D] Add support for the 'directorargout' typemap.\n [Java] Add (char *STRING, size_t LENGTH) director typemaps.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12877 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-12-20 20:50:36 +00:00
William S Fulton f13d958214 same class name in different namespaces confusion when using multiple modules.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-11-13 17:08:15 +00:00
William S Fulton 24133bacd7 Remove numerous hard coded 'result' variable name in generated c/c++ wrappers. The variable name is now defined in just one place, making it possible to change the name easily if a target language so wishes - see cwrap.c.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12830 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-10-30 21:51:50 +00:00
William S Fulton 44c202d048 Add in $symname expansion for director methods
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12772 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-08-04 19:45:19 +00:00
William S Fulton 72ffdb930d Repeat autodoc fixes for Octave and Ruby as done previously for Python
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12740 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 20:46:20 +00:00
William S Fulton 58e74e8675 Rename python_kwargs testcase to kwargs_feature. Add kwargs_feature to Ruby and fix Ruby warnings when using kwargs feature. Add %kwargs macro for Ruby
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12739 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-06-13 17:38:08 +00:00
William S Fulton a63d456f8a Remove redundant code highlighted by warnings in gcc-4.6
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12536 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-14 07:22:08 +00:00
William S Fulton b69b793d8e Better consistency in usage display
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12524 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-09 21:42:38 +00:00
Olly Betts eaada32f26 [Ruby] Avoid segfault when a method node has no parentNode (SF#3034054).
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12237 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-10-01 04:42:29 +00:00
William S Fulton 1e051820ec Line/file reporting corrections for warnings: WARN_RUBY_MULTIPLE_INHERITANCE, WARN_TYPE_UNDEFINED_CLASS, WARN_MODULA3_MULTIPLE_INHERITANCE
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-09-21 06:07:06 +00:00