Nihal
290198495f
Support Disown functionality.
...
Creating newobject variable under struct which stores this pointer.
Using that to implement Disown.
2017-07-19 20:49:33 +05:30
Nihal
4458040975
Refactor Code: Change Approach to emit necessary code for pointer params.
...
Use in typemap.
2017-07-19 20:49:26 +05:30
Nihal
c6cfad2aab
Remove SWIG_Get_Type in magic getter and setter methods.
...
Use respective getter and setter methods.
2017-07-19 20:49:22 +05:30
Nihal
de31666c3a
Fixup: Remove TRMS Stuff (Not used in PHP7).
...
Remove Cmp of class_name with NULL.
Reuse code to find "_get" (getters) methods of member variables.
2017-07-19 20:48:50 +05:30
Nihal
58aff09ebe
Add magic methods support (__get, __set, and __isset) inherently to the extensions.
...
This to to maintain compatibility and consistency.
2017-07-19 20:48:46 +05:30
Nihal
42f012b2d1
Bug Fix of double freeing. It used to create a new object for all get commands of class/struct pointers.
...
Now creating only if newobject is lit, or else creating a basic zend object to return to user.
2017-07-19 20:48:27 +05:30
Nihal
9addd37640
Use pre-exisiting function is_class to check a valid class/struct defenition.
2017-07-19 20:48:24 +05:30
Nihal
ce04574059
Add support to access static member variables in different way.
...
This is to keep compatibility and consistency with the older way.
Shape::nshapes static variable's setter and getter methods can be
accessed by Shape::nshapes(10),Shape::nshapes() respectively.
2017-07-19 20:48:19 +05:30
Nihal
4de2f257f9
Using wname variable for function name generated in .cxx or .c wrapper.
...
This is to ensure compatibility and consistency
2017-07-19 20:48:15 +05:30
Nihal
5e001d5288
Add class constants support to access class enums and class constants.
...
"flat" constants changed to class constatns.
Example: Foo_IMPULSE -> Foo::IMPULSE
2017-07-19 20:48:01 +05:30
Nihal
11e2f53840
Object Structure approach Code
...
Takes care of simple class wrapping with pointers, enum, values, variables, and inheritance.
2017-07-19 20:47:53 +05:30
William S Fulton
7be6c10d4a
Fix display of documented template types when using the autodoc feature for Python.
2017-07-07 19:35:44 +01:00
Nihal
251d25346d
Fix OUTPUT Typemap not having return statement bug in PHP wrapper.
2017-06-28 09:47:33 +12:00
William S Fulton
a2267a8152
Memory leak fixes in Python default argument handling
2017-06-23 14:19:12 +01:00
Olly Betts
2425c8d6d8
Don't handle cases like -1U as Python constants
2017-06-23 14:54:50 +12:00
Michael Thon
80ffb169c1
[Python] fix and improve default argument handling
...
1. Fix negative octals. Currently not handled correctly by `-py3`
(unusual case, but incorrect).
2. Fix arguments of type "octal + something" (e.g. `0640 | 04`).
Currently drops everything after the first octal. Nasty!
3. Fix bool arguments "0 + something" (e.g. `0 | 1`) are always
"False" (unusual case, but incorrect).
4. Remove special handling of "TRUE" and "FALSE" from
`convertValue` since there's no reason these have to match
"true" and "false".
5. Remove the Python 2 vs. Python 3 distinction based on the
`-py3` flag. Now the same python code is produced for default
arguments for Python 2 and Python 3. For this, octal default
arguments, e.g. 0644, are now wrapped as `int('644', 8)`. This
is required, as Python 2 and Python 3 have incompatible syntax
for octal literals.
Fixes #707
2017-06-23 13:38:49 +12:00
William S Fulton
687cf9c9c1
Add missing %python:maybecall to operator overloads.
...
This ensures NotImplemented is returned on error so that the Python
interpreter will handle the operators correctly instead of throwing an
exception. NotImplemented was not being returned for non-builtin wrappers
when the operator overload did not have a function overload.
See PEP 207 and https://docs.python.org/3/library/constants.html#NotImplemented
Mentioned in SF patch #303 and SF bug #1208 .
2017-06-19 19:25:27 +01:00
William S Fulton
11aa71b939
Make sure warning and error messages are not split up
...
They could be split up by other processes writing to stdout
at the same time.
2017-06-16 19:24:48 +01:00
William S Fulton
6a7cd97fe9
Fix R function pointer wrappers containing lvalue and rvalue reference parameters
2017-06-16 07:41:05 +01:00
William S Fulton
9d5d991f83
Merge branch 'master' of git+ssh://github.com/swig/swig
...
* 'master' of git+ssh://github.com/swig/swig:
update changes referencing issue
fix Scilab 6.0.0 linking issue
Conflicts:
CHANGES.current
2017-06-05 20:58:12 +01:00
William S Fulton
57a89f987d
Fix %import and %fragment forced inclusion to not generate code.
2017-06-03 18:37:05 +01:00
William S Fulton
9f55985a6c
Remove unused code
2017-06-03 18:37:05 +01:00
Clément DAVID
9278593dc4
fix Scilab 6.0.0 linking issue
2017-05-30 14:42:44 +02:00
William S Fulton
a2d65ca3bb
Merge branch 'asibross-master' into director-smartptr-ownership
...
* asibross-master:
Missing smart pointer handling in Java director extra methods implementation.
Conflicts:
Source/Modules/java.cxx
2017-05-25 08:00:35 +01:00
William S Fulton
05badeb1a4
Remove undocumented features used in directors
...
The jsdowncast and csdowncast features are not documented and I think
these are a relic of something that was never finished.
2017-05-21 17:43:06 +01:00
William S Fulton
b90a8d7444
Remove unnecessary dynamic_cast in C#/D/Java directors
...
Also revert the removal of dynamic_cast in the csdowncast feature.
2017-05-21 17:42:27 +01:00
William S Fulton
7f2849cb0a
Merge branch 'Sghirate-master'
...
* Sghirate-master:
[C#] static_cast for native directors
2017-05-21 00:22:17 +01:00
William S Fulton
81ba06e59e
Fix Python negative unsigned default values
...
Closes #993
2017-05-21 00:02:08 +01:00
Julien Schueller
ed54cc904c
Fix E731: do not assign a lambda expression
...
https://www.python.org/dev/peps/pep-0008/#programming-recommendations
2017-05-19 22:49:23 +02:00
Olly Betts
9a0180c56c
Merge pull request #970 from nihal95/master
...
Adds pragma version directive for php5 and php7. Fixes #360 .
2017-05-16 17:47:35 +12:00
William S Fulton
320df84607
Add missing return for pure virtual director wrappers for D and C#
2017-05-13 23:17:02 +01:00
William S Fulton
ebd37155a8
Fix potential use of uninitialized variables in directors
2017-05-13 22:40:59 +01:00
William S Fulton
731f175d21
propagate c++11 noexcept to director classes for Go
2017-05-13 18:13:53 +01:00
William S Fulton
f6d10278f8
Merge branch 'yag00-master'
...
* yag00-master:
Add raise methods for throwing c++ exceptions in C#, Java, D
php5: propagate c++11 noexcept to director classes
Revert "java : noexcept method can't raise Swig::DirectorException"
Revert "csharp : noexcept method can't raise Swig::DirectorPureVirtualException"
csharp : noexcept method can't raise Swig::DirectorPureVirtualException
java : noexcept method can't raise Swig::DirectorException
#526 : propagate c++11 noexcept to director classes
#526 : propagate c++11 noexcept to director classes test case
2017-05-13 17:05:25 +01:00
William S Fulton
07ab80b49e
Add raise methods for throwing c++ exceptions in C#, Java, D
...
The director c++ exceptions are thrown in a helper method instead of in
the director overloaded method. This circumvents compiler warnings about
throwing exceptions when the method has an exception specification or
noexcept. If the exception is thrown, abort will still be called!
In Java, the "director:noexcept" typemap can be used to do something
else. This typemap should be ported to the other languages too.
2017-05-13 17:01:15 +01:00
William S Fulton
971404485f
php5: propagate c++11 noexcept to director classes
2017-05-13 16:59:36 +01:00
William S Fulton
cedfbfbee8
Revert "java : noexcept method can't raise Swig::DirectorException"
...
This reverts commit e13eaaae21 .
2017-05-13 16:16:29 +01:00
William S Fulton
e429a891c9
Revert "csharp : noexcept method can't raise Swig::DirectorPureVirtualException"
...
This reverts commit 9dcf10138e .
2017-05-13 16:16:17 +01:00
Nihal
eb9e72f3b2
Add new pragma to specify version to PHP5 and PHP7 extensions.
...
See issue #360 , feature request to have version in php5 and php7 extensions.
2017-05-08 11:43:38 +05:30
Nihal
3adf88e9ef
Refactor to generate init section before the code.
...
Prerequisite to address issue #360 , feature request of adding extension version.
This change has been taken from Sources/Modules/php.cxx - PHP7 Backend.
2017-05-07 17:49:02 +05:30
Christophe Duvernois
9dcf10138e
csharp : noexcept method can't raise Swig::DirectorPureVirtualException
2017-04-28 11:45:36 +02:00
Christophe Duvernois
e13eaaae21
java : noexcept method can't raise Swig::DirectorException
2017-04-28 11:45:02 +02:00
Christophe Duvernois
4777a0ad3c
#526 : propagate c++11 noexcept to director classes
2017-04-27 23:37:15 +02:00
Philip Herron
624ec3e1b7
Fix bug with comments inline in macros
...
- commit fixes #974
2017-04-27 15:35:13 +01:00
Simon Marchetto
c06c9b3853
[Scilab] New parameter targetversion to specify the Scilab target version (5, 6, ..) for code generation
...
With Scilab 6 target specified, identifier names truncation is disabled (no longer necessary)
Signed-off-by: Simon Marchetto <simon.marchetto@scilab-enterprises.com>
2017-04-12 13:54:42 +02:00
William S Fulton
29af5c7aec
Merge branch 'srepmub-coverity_args_check'
...
* srepmub-coverity_args_check:
[Coverity] fix issue reported for wrapper argument checking
2017-03-24 07:26:54 +00:00
William S Fulton
dcc5911839
Fix handling of typedef'd function pointers for Go
...
Add equivalent runtime tests for Python and Java
2017-03-17 07:49:21 +00:00
William S Fulton
72ba741d1c
Fix wrapping of references/pointers and qualifiers to member pointers
...
Also fix Go wrapping of member const function pointers.
2017-03-16 21:04:38 +00:00
William S Fulton
b851e45e0a
Fix seg fault for global declarations declared erroneously without a name
2017-03-10 23:25:31 +00:00
William S Fulton
4f235027f4
Improved member function pointer parsing
...
Add support for parsing member function pointers with qualifiers,
references and pointers, eg
short (Funcs::* const parm)(bool)
2017-03-10 23:25:31 +00:00