William S Fulton
c3c061cac8
Add Python support for std::unique_ptr inputs
...
Equivalent to Java/C# implementation.
2022-07-17 15:20:20 +01:00
Olly Betts
b2c58115d7
Fix previous commit
...
Revert changes inadvertently included, and fix `=` to `==`.
2022-03-20 19:44:23 +13:00
Olly Betts
029ddab8b5
[ci] Try to fix failing appveyor python builds
2022-03-20 18:42:50 +13:00
Olly Betts
69b580dfb6
[php] Use SWIG_TypeCheckStruct to check types
...
We have the swig_type_info available and SWIG_TypeCheckStruct
is more efficient because it uses a pointer comparison instead of the
string comparison SWIG_TypeCheck uses (this change speeds up `make
check-php-test-suite` by about 10%).
2021-12-19 13:45:25 +13:00
Even Rouault
abda4caeae
swigrun.swg: fix typo
...
Spotted by lintian QA tool used by Debian packaging
2021-04-21 15:49:15 +12:00
William S Fulton
3efea1f4ab
Fix typecheck typemaps for non-pointers and NULL
...
The typecheck typemaps succeed for non pointers (SWIGTYPE, SWIGTYPE&,
SWIGTYPE&&) when the equivalent to C NULL is passed from the target
language. This commit implements a fix for Python to not accept a Python
None for non-pointer types.
Issue #1202
2018-12-29 11:45:46 +00:00
Dan Williams
7bcf3ddc89
Remove gcc warnings when using -Wconversion. Right side of expressions are signed char.
2016-04-27 10:55:22 -04:00
Curtis Dunham
fe91d6449f
Remove register storage class declarations
...
They're unnecessary, anacronistic, deprecated in modern
standards, generally ignored, useless, and (most importantly)
clang complains about them.
2014-02-19 11:58:27 -06:00
Sylvestre Ledru
7a88729c87
Remove trailing spaces in the generated code.
...
No functional changes
2013-09-13 10:02:39 +02:00
William S Fulton
670962cfe8
SWIG_TypeCompare was not working as commented - return values were 0,1 and not 1,0,-1. Although undocumented and not used anywhere within SWIG, it has been replaced with SWIG_TypeCmp to work as commented.
2013-03-04 07:32:40 +00:00
Michel Zou
8155e14579
Macro expansion to self assign is effectively ignored.
2013-02-26 09:26:13 +01:00
Michel Zou
c23b7606cf
MOdified only no-cast-rank version of SWIG_AddCast.
2013-02-25 11:07:42 +01:00
Michel Zou
7acf6b5fef
Revert "Fixed #1300 clang warning in SWIG_Python_ConvertPtrAndOwn."
...
This reverts commit 8e340c158c .
2013-02-25 09:53:45 +01:00
Michel Zou
8e340c158c
Fixed #1300 clang warning in SWIG_Python_ConvertPtrAndOwn.
2013-02-22 10:11:50 +01:00
Olly Betts
6bd53139fb
Fix typo in comment
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12139 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2010-06-20 15:27:34 +00:00
William S Fulton
dfd94424ba
remove SWIG_TypeCheck_Template so that the code within it is debuggable
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10966 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-12-06 17:18:38 +00:00
William S Fulton
c6d76a5965
Bump SWIG_RUNTIME_VERSION due to change in the conversion functions, ie change in definition of swig_converter_func
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10244 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-10 21:44:18 +00:00
William S Fulton
f39242fa92
Complete the Python support for shared_ptr mainly for derived classes. This includes the smartptr feature for overriding the class registration function and shared_ptr typemaps
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10236 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-02-09 12:25:41 +00:00
William S Fulton
a91c3e9120
minor typo in comment
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10202 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-01-12 22:39:39 +00:00
William S Fulton
e1d7790968
VC++ warning fix
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10031 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2007-10-23 21:59:33 +00:00
John Lenz
cf3a18e631
Increment SWIG_RUNTIME_VERSION to 3, because of addition of owndata
...
Reported by: Prabhu Ramachandran
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@9214 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-07-15 01:38:53 +00:00
William S Fulton
797317163a
cosmetics
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8988 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-03-07 22:02:54 +00:00
Marcelo Matus
555ffa5fb4
fix warning reported by Nitro in VC7
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8837 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-18 01:27:30 +00:00
Marcelo Matus
863369cc41
simplify output via macro SWIG_ArgError
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8737 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-07 17:37:13 +00:00
Marcelo Matus
d3eec7a22f
delete some inlines which confuse gcc for very large interfaces
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8200 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-03 19:54:53 +00:00
Marcelo Matus
e4e72e63fa
add support for more 'expressive' result values, which now can carry the old OK/ERROR state, and also the cast rank and the New/Tmp masks
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8094 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-27 22:04:58 +00:00
Marcelo Matus
6bf5187168
add castmode in python and cleaning the castdispatch mechanism
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8051 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-23 09:22:17 +00:00
Marcelo Matus
ae09b70a40
changes to support cast ranking for dispatch and/or overloading
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8044 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-23 00:06:27 +00:00
Marcelo Matus
56a0905b18
add faster pair typemap
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7994 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-16 18:38:19 +00:00
Marcelo Matus
41b66ae54a
fix runtimes for subversion
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7941 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-07 07:40:42 +00:00
Marcelo Matus
6d57482864
add SWIGUNUSEDPARM
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7917 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-02 08:42:41 +00:00
Marcelo Matus
f2d1e94900
add owndata field to swig_type_info, so clientdata can be properly delete if needed
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7822 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-11-08 15:53:30 +00:00
Marcelo Matus
66e13bf0f0
put the common error labels in a more public place, visible from java/C# and the rest
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7687 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-19 12:12:55 +00:00
Marcelo Matus
7e5e4fd1f9
massive typemap unification
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7676 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-18 13:24:15 +00:00
Marcelo Matus
0401d64483
fix clientdata initialization, error detected when converter is null (protected classes)
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7420 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-09-10 20:16:38 +00:00
Marcelo Matus
b5875c21bb
following Bill's labels patch, we add swiglabels.swg
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7015 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-28 23:59:12 +00:00
Marcelo Matus
5b74ab97a7
more fixes for security and warnings
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7009 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-26 20:25:10 +00:00
Marcelo Matus
e38ce2b2c3
more warning fixes, cosmetics, and uniformity changes
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7006 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-26 08:47:17 +00:00
Marcelo Matus
43b0008892
fix static/inline warning, add SWIGUNUSED attribute
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6979 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-22 19:51:59 +00:00
John Lenz
15392cf5f7
Add __attribute__ ((unsued)) to runtime functions for gcc compilers
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-01 18:58:47 +00:00
John Lenz
c3338b1a16
- Improve the runtime type sytesm
...
- Update all languages to new type system
- Add DohSortList function
- Fix mzscheme Examples/Makefile
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-01 00:08:24 +00:00
Marcelo Matus
492c58c659
using the global runtime.swg instead of python/pyrunalias.swg. Now the same solution can be used in other languages
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6763 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-21 19:36:26 +00:00
Marcelo Matus
0881d3c861
Add simple PySwigObject to handle the C/C++ instance pointers,
...
instead of using PyCObject or plain strings.
The new PySwigObject is even safer than PyCObject, and
more friendly than plain strings:
now you can do
print a.this
<Swig Object at _00691608_p_A>
print str(a.this)
_00691608_p_A
print long(a.this)
135686400
print "%s 0x%x" % (a.this, a.this)
_00691608_p_A 0x8166900
the last one is very useful when debugging the C/C++ side, since
is the pointer value you will usually get from the debugger.
Also, if you have some old code that uses the string representation
"_00691608_p_A", you can use it now again by calling str(ptr), or
maybe nothing special by just calling PyString_AsString(..).
This change is mainly for nostalgic swig users that miss the
string representation, but also allows to say again
if a.this == b.this:
return "a is b"
and well, since the change were really simple, maybe in the future
we will be able to do
next = a.this + 1
or add native python iteration over native C/C++ arrays, ie, no
need to create/copy new tuples when returning and array or vector.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-19 20:40:20 +00:00
Marcelo Matus
811c159e38
allow to include the swig runtime code into external user libraries
...
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6752 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-18 00:37:33 +00:00