Commit graph

29 commits

Author SHA1 Message Date
William S Fulton
c5322a9ecb Python use Py_ssize_t instead of int for better portability 2015-12-05 09:00:04 +00:00
William S Fulton
ace8fcd972 SWIG_AsWCharPtrAndSize improper operation if cptr NULL
SF bug #1327

This doesn't have any noticeable effect with the usage of
SWIG_AsWCharPtrAndSize as shipped by SWIG, but could be a problem if a
user is using this function with cptr equal to zero and psize is non-zero
 - the length would be incorrectly set due to the call to PyUnicode_GetSize
failing.
2013-07-02 18:58:56 +01:00
William S Fulton
caa055b7fb Remove C++ header breaking C tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-10 00:29:36 +00:00
Stefan Zager
17af467132 Fix for bug #3057804: migrate PyCObject to PyCapsule.
Other misc. fixes for python3.2, mostly dealing with changed
interfaces to python functions.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@12620 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-09 22:07:22 +00:00
Stefan Zager
3d444101d1 A slew of changes based on William Fulton's code review.
- Fixed naming conventions; SwigPyBuiltin is used a lot
- Removed use of std::vector
- builtin.swg isn't included if -builtin isn't specified
- Changed many feature names to use a "python:" prefix
- Eliminated static vars in std_pair.i
- Eliminated C++-style comments (//)
- Enabled autodoc and docstring with -builtin
- Fixed non-ansi generated C code
- Detect and complain if two incompatible swig modules are loaded
- Removed argcargvtest_runme3.py, and fixed argcargvtest_runme.py
  so that 2to3 handles it better
- Removed anonymous namespaces
- Eliminated builtin_init typemaps; consolidated functionality into
  SWIG_Python_NewPointerObj
- Eliminate printf warnings from %U conversion character by switching
  to %S, which works just as well
- Fixed li_std_set_runme.py for python3, which returns set members in
  a different order from python2





git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-29 06:57:02 +00:00
William S Fulton
e2679a6fd3 correct return type for PyUnicode_GetSize
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@11041 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2009-01-08 19:20:51 +00:00
Haoyu Bai
3d8ddfc442 Merged the Python 3.0 support branch. The merging progress is not so smooth, so hope this commit won't make anything broken.
This is the (incomplemete) log produced by svnmerge.py:

Merged revisions 10405-10409,10420-10422,10426,10438,10445,10451,10454-10465,10467,10473-10475,10485,10488-10489,10493-10495,10497,10509-10510,10513-10514,10517,10520,10525,10528-10529,10533-10535,10554-10557,10570,10573,10593,10614,10666-10669,10673,10678,10687,10690,10704-10706,10731,10744,10750-10752,10755,10759,10770,10775-10776,10813,10819 via svnmerge from 
https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-bhy



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2008-09-11 17:18:07 +00:00
Marcelo Matus
a2c99f619d reduce the aliasing warnings (when compiling with CFLAGS='-O2 -Wstrict-aliasing=2') to the minimum, ie, enums and pointer to functions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8883 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-02-23 21:43:33 +00:00
Marcelo Matus
7065472c88 silence warnings with -O1 -Wall
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8499 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-21 01:03:37 +00:00
Marcelo Matus
abbf8b406a more on the TypeQuery fix
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7971 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 23:53:53 +00:00
Marcelo Matus
ae761ca3ba fix extra calls to TypeQuery for 'char *' and 'wchar_t *'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7968 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 20:20:19 +00:00
Marcelo Matus
e0eea5f625 add safecstrings option and leave the default of string conversions as in older version, ie, return the pointer not a copy
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7963 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-10 00:36:12 +00:00
Marcelo Matus
922d58ac19 don't use Py_None directly nor &PyType_Type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7925 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-12-04 08:50:00 +00:00
Marcelo Matus
3c65cea431 Perl added to the Unified typemap library, cleaner way to use the library, and 'normalized' macro names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7707 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-24 14:59:05 +00:00
Marcelo Matus
7564088646 fix warnings/errors for gcc4.0, icc and valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7689 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-19 14:26:13 +00:00
Marcelo Matus
aadff06f45 more typemaps unification and fixes for valgrind
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7684 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-10-19 10:52:50 +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
a2f5af9ddd fix #1188207 and uniform the error/null/none handling
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7225 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-05-26 20:43:33 +00:00
Marcelo Matus
192e00615d More fix for warnings, and add some of the ideas of the Bill's 'labels' patch
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6998 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-24 23:48:20 +00:00
Marcelo Matus
988db075cb fix char* typemap in bug #1080514
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6856 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-11 08:30:40 +00:00
Marcelo Matus
dc4409a1f1 isolate language independent STD/STL/C++ code + more documentation + cleaning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 06:42:15 +00:00
Marcelo Matus
e46c80edf8 replacing SWIGSTATIC(a) by SWIGINTERN a
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6290 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-02 20:15:46 +00:00
Marcelo Matus
a4a7a2ff1f better error messages, more comments, clean up for the next major modifications
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6284 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-02 01:43:17 +00:00
Marcelo Matus
f9db4dd648 fix anoher warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6255 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-17 22:08:48 +00:00
Marcelo Matus
349e6bc6ee using <> when including lib files, fix char{ANY], add char FIXSIZE[ANY], fix pyfragments.swg, fixing *.swg and *.i names
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6250 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-17 06:17:35 +00:00
Marcelo Matus
bc715fc9a0 fix warnings for intel compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6194 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-01 08:07:45 +00:00
Marcelo Matus
12af360d6f fixes for char[], const char[], and cleaning wchar_t
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5930 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-05-27 11:25:31 +00:00
Marcelo Matus
f473b1f152 added wchar_t type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5835 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:31:24 +00:00
Marcelo Matus
459e527647 add wstring/wchar_t support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5829 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-05 20:12:02 +00:00