Commit graph

17,175 commits

Author SHA1 Message Date
Vadim Zeitlin
fdc6bbeda3 Don't always use "*args" for all Python wrapper functions.
Due to what seems like a bug introduced during Python 3 support merge, all the
generated Python functions used the general "*args" signature instead of using
the named parameters when possible.

This happened due to is_primitive_defaultargs() always returning false for the
functions without any default arguments as "value" passed to convertValue()
was NULL in this case and convertValue() always returns false for NULL.

Fix this by checking for value being non-NULL before calling convertValue().

Doing this exposed several problems with the handling of unnamed, duplicate
(happens for parameters called INOUT, for example) or clashing with keywords
parameter names, so the code dealing with them had to be fixed too. Basically
just use makeParameterName() consistently everywhere.
2014-08-17 01:08:32 +02:00
Vadim Zeitlin
80a72d50c7 No real changes, just make PYTHON::check_kwargs() const.
This will allow calling it from const methods too.
2014-08-16 13:11:22 +02:00
Vadim Zeitlin
9f1af8921f Refactor: move makeParameterName() to common Language base class.
This method was duplicated more or less identically for 4 languages and will
be needed for another one soon, so put it in the base class from which it can
be simply reused instead.

No changes in the program behaviour whatsoever.
2014-08-16 13:11:22 +02:00
Vadim Zeitlin
07e2568a20 Remove long line wrapping from Python parameter list generation code.
This doesn't play well with PEP8 checks which imposes very strict continuation
line indentation rules which need to be _visually_ aligned, i.e. the subsequent
lines must be indented by the position of the opening bracket in the function
declaration line, but the code generating the parameter lists doesn't have
this information and so it's impossible to do it while avoiding either E128 or
E123 ("continuation line {under,over}-indented for visual indent" respectively)
error from pep8.

Moreover, the wrapping code didn't work correctly anyhow as it only took into
account the length of the parameter list itself and not the total line length,
which should include the function name as well.

So just disable wrapping entirely, long lines shouldn't be a problem anyhow in
auto-generated code.
2014-08-10 14:52:00 +02:00
William S Fulton
2b71c99feb Add C# license header changes for StyleCop to changes file 2014-08-04 19:44:47 +01:00
William S Fulton
e5b98d8331 Merge branch 'gpetrou-CSharpLicense' - Add autogenerated xml for StyleCop.
* gpetrou-CSharpLicense:
  Tweak generated C# .cs files header
  Changed CSharp license header to include auto-generated tag so that StyleCop ignores the files.
2014-08-04 19:42:16 +01:00
William S Fulton
69736cc0cb Tweak generated C# .cs files header 2014-08-04 19:41:38 +01:00
William S Fulton
d180908066 Merge branch 'yuvalk-master' - Java NIOBUFFER typemaps for java.nio.ByteBuffer
* yuvalk-master:
  Add changes entry for NIOBUFFER Java typemaps
  Doc/comment improvements in Java various.i
  Add support for java.nio.Buffer including test-suite test case and documentation
2014-08-04 19:31:28 +01:00
William S Fulton
db7514860d Add changes entry for NIOBUFFER Java typemaps 2014-08-04 19:27:30 +01:00
William S Fulton
1773726073 Doc/comment improvements in Java various.i 2014-08-04 19:22:02 +01:00
gpetrou
8433539849 Changed CSharp license header to include auto-generated tag so that StyleCop ignores the files. 2014-08-02 08:35:15 +01:00
Yuval Kashtan
093fe2a556 Add support for java.nio.Buffer
including test-suite test case and documentation
2014-07-18 15:45:16 +03:00
Ian Lance Taylor
287e84d84c [Go] Change struct definition to use void *, not uint8, so
that the type is recorded as possibly containing
pointers.  This ensures that the 1.3 garbage collector
does not collect pointers passed to C++ code.
2014-07-14 08:33:43 -07:00
William S Fulton
83749b3937 Fix expansion of the $parentclassname special variable
It incorrectly contains brackets in the expanded name.
Fixes SF Bug 1375.
2014-07-01 20:27:48 +01:00
William S Fulton
e982dc7e3b Correct documentation of special variable names
$parentname is really $parentclassname
$parentsymname is really $parentclasssymname
2014-07-01 20:07:19 +01:00
William S Fulton
0a4b50162d Remove author names - they are in the COPYRIGHT file 2014-06-24 18:56:52 +01:00
Olly Betts
8d226e39dc Merge pull request #188 from jschueller/python_pep8
Python PEP-8 conformity
2014-06-10 23:48:38 +12:00
Julien Schueller
11b5a61879 Check multi-module examples. Dont use sed. 2014-06-10 08:59:55 +02:00
Julien Schueller
eb26847255 Typo 2014-06-08 15:44:44 +02:00
Julien Schueller
8a0a8529e5 Clone pep8 in source dir. 2014-06-08 15:43:02 +02:00
Olly Betts
b58caf6978 Add more new PHP5.6 keywords 2014-06-08 22:04:55 +12:00
Julien Schueller
48fcf61515 Ubuntu's pep8 is too old, use 1.5.7 2014-06-07 14:33:38 +02:00
Julien Schueller
7a4cef998c Enable pep8 check 2014-06-07 13:10:27 +02:00
Julien Schueller
6fe71da9fa Fixed remaining pep8 errors 2014-06-07 13:09:15 +02:00
William S Fulton
8728a97dc6 Bump version to 3.0.3 2014-06-06 19:56:38 +01:00
Jason Turner
fa36b6228e Fix function naming conflict with class overloads.
This fix takes into account the classname while generating overload
handlers.

Example:

If you have two classes:

  class A {
    public:
      void doSomething(int);
      void doSomething(double);
  };

  class B {
    public:
      void doSomething(int);
      void doSomething(double);
  };

Before this patch, the overload handlers for A::doSomething and
B::doSomething create conflicting names and function redefinition errors
are caused.

After the patch, the overload handlers are named classname_doSomething
and no longer conflict.

This is might not the best way to implement this, but it
solves a critical problem on large projects, and specifically can affect
operator overloads that are being wrapped.
2014-06-06 18:24:22 +02:00
Julien Schueller
f4fffbf668 Fixed another E701 2014-06-06 15:13:23 +02:00
Julien Schueller
93e06c0e58 Fixed another E231 2014-06-06 14:44:46 +02:00
Julien Schueller
36cac80166 Fixed some pep8 issues E701 2014-06-06 14:27:17 +02:00
Julien Schueller
01a9946455 Fixed some pep8 issues E302 2014-06-06 11:28:00 +02:00
Julien Schueller
0d589349a1 Fixed pep8 issues E701, E203, E231, E261 2014-06-06 11:03:46 +02:00
Julien Schueller
e0c432f70d Use 4 spaces in emitFunctionShadowHelper for python 2014-06-05 16:51:23 +02:00
William S Fulton
ef4cb2f574 Fix example clean target in makefile for operating systems that don't use .so as shared library extension 2014-06-04 13:00:18 +01:00
William S Fulton
1949e2cc63 Fix equality testcase 2014-06-04 12:21:09 +01:00
William S Fulton
37c09b0104 Add 3.0.2 release date 2014-06-04 08:48:04 +01:00
William S Fulton
acd0ebc660 changes file updates 2014-06-02 20:01:07 +01:00
William S Fulton
c17f77750a Merge pull request #176 from v-for-vandal/lua_eq
Add default __eq implementation for Lua
2014-06-02 19:52:07 +01:00
William S Fulton
6d5444e587 CHANGES update 2014-06-02 07:23:14 +01:00
William S Fulton
81d023ac05 Merge branch 'wkalinin-csymbols-2' - %extend and nested structs
* wkalinin-csymbols-2:
  Add runtime test for %extend and nested union
  test fixed
  %extend symbols for nested structs get into a wrong C symbol table
2014-06-02 07:11:22 +01:00
William S Fulton
5f3ee109c8 Add runtime test for %extend and nested union 2014-06-02 07:09:35 +01:00
Karl Wette
6612997b63 Fix bug in DohNewStringWithSize(): guarantee string is nul-terminated 2014-06-01 15:33:26 +02:00
William S Fulton
22be94d207 Fix std::vector<bool> compile problems on OSX for Javascript 2014-05-31 19:58:42 +01:00
Vladimir Kalinin
84e1b553c4 test fixed 2014-05-31 07:59:39 +04:00
Karl Wette
ecf28da5a9 Octave: remove deprecated -global/-noglobal command-line arguments 2014-05-29 23:42:55 +02:00
Karl Wette
b2d492c15a Octave: use common example.mk for examples, patterned after javascript 2014-05-29 23:42:55 +02:00
Karl Wette
ebe1338015 Octave: whitespace/indentation cleanup of octave.cxx 2014-05-29 23:42:55 +02:00
Karl Wette
5c5510842b Octave: remove Python code from std_carray.i 2014-05-29 23:42:55 +02:00
Karl Wette
603a73142a Octave: ignore generated files 2014-05-29 23:42:55 +02:00
Karl Wette
cdd894d2af .gitignore: add Source/TAGS 2014-05-29 23:42:55 +02:00
William S Fulton
36a6a0cbe0 Update AX_BOOST_BASE autoconf macro to serial 23 2014-05-29 19:54:13 +01:00