Commit graph

72 commits

Author SHA1 Message Date
Marcelo Matus
e380e27391 fix #endif position bug #1249878
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7388 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-08-23 10:55:05 +00:00
Marcelo Matus
a83919ab69 remove the _AS_XX macros, just in case the Check methods are too permissive
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7311 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-21 18:52:04 +00:00
Marcelo Matus
327bbc06ac more fixes for python 1.5 +gcc2.96
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7301 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-17 19:12:21 +00:00
Marcelo Matus
50557fb547 more fixes for 1.5
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7299 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-17 01:41:22 +00:00
Marcelo Matus
e926d03dca add patch 1221362 for pyhton 2.1
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7295 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-17 00:20:12 +00:00
William S Fulton
4fea1d827a Various fixes for Visual C++ 7.1 and Sun Studio 10
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7255 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-06-03 20:52:16 +00:00
Marcelo Matus
9894f1b2d3 fix prototype warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7086 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-19 21:38:32 +00:00
Marcelo Matus
7ee5f85b5a fix prototype warning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7082 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-19 19:35:42 +00:00
Marcelo Matus
6bb35657f2 fix possible seg fault when reporting bad object type
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7061 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-14 21:16:25 +00:00
Marcelo Matus
a25fbd5159 fix seg fault when runtime fails
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7060 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-12 01:11:49 +00:00
Marcelo Matus
ca7159f7e7 add better director+exception support
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7038 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-07 20:47:55 +00:00
Marcelo Matus
3c385cb49c better SwigPyObject -> long/hex/oct, no warnings now
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7025 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-05 02:19:48 +00:00
Marcelo Matus
e69c547289 fix compare, reported by Cameron Patrick
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7023 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-04 18:17:10 +00:00
Marcelo Matus
32d5addaa6 fix hex pointer conversion
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7021 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-03-02 17:52:34 +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
4c873ffb8d finishing change from 'static' to 'SWIGINTERN'
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@7001 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-25 07:40:41 +00:00
Marcelo Matus
6bfa1437bb fix seg. fault after error report
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6995 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-24 20:40:21 +00:00
Marcelo Matus
3853c510c6 fix PyOS_snprintf for old python versions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6981 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2005-02-22 19:53:41 +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
1b3848b579 fix for Windows
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6860 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-11 23:38:44 +00:00
Marcelo Matus
e14b6980f7 fixes for void*
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6816 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-01 01:20:04 +00:00
Marcelo Matus
a111449e8c Prabhu's fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-22 16:47:49 +00:00
Marcelo Matus
8e0ff81516 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@6765 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-21 19:44:08 +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
Marcelo Matus
5d741fe99f better error message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6708 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-10 23:00:49 +00:00
John Lenz
af9b02bc60 The new python runtime now works from python versions 1.6.1 to 2.3.4
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 21:26:39 +00:00
Marcelo Matus
da29a4793d more warns fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 16:37:10 +00:00
Marcelo Matus
a1b15cede0 fix warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 08:24:22 +00:00
Marcelo Matus
2d4f884ee0 fix warnings for MS compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6585 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 22:16:52 +00:00
Marcelo Matus
72b2faf604 no more zero value accepted for pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6498 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-25 19:11:25 +00:00
John Lenz
0c57969c61 - Add SWIG_RUNTIME_VERSION to new type sharing code. This is for future-proof, if
the format of swig_type_info ever changes, this number should be incremented
- Add SWIG_LINK_RUNTIME and SWIG_STATIC_RUNTIME symbols to python
- Convert inline into SWIGINLINE


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 21:53:54 +00:00
Marcelo Matus
c0dc57464a prevent to overide the pointer value when an error occurred
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:25:31 +00:00
John Lenz
75e462baa8 Removed ability to share type information by C linking
All type sharing happens through a global variable in the target language.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 18:23:59 +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
7346e7eaf2 fix version check for python 2.3.0
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6372 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-07 23:00:57 +00:00
Marcelo Matus
0b3f8bf2ce LookupTypePointer now as pyrun
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6335 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-05 23:20:34 +00:00
Marcelo Matus
2c962d36f2 isolating the pure 'runtime' code in pyrun.swg, the API declarations are now in pyapi.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6289 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-02 18:44:48 +00:00
Marcelo Matus
983d4abe42 add John Lenz patch for avoiding the runtime library, but allowing the old approach to coexist
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6288 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-02 17:54:38 +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
3d5d0f535a cleaning + comments, and add the nondynamic feature handlers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6266 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-09-26 01:00:28 +00:00
William S Fulton
7f1a06e20d Removed redundant #include of Python.h
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6158 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-08-26 21:17:18 +00:00
Marcelo Matus
b2ede29b59 some performance improvements
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5982 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-06-14 09:14:48 +00:00
Marcelo Matus
3983cc1471 fix tp_del field
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5834 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 06:28:07 +00:00
Marcelo Matus
86a9374ea1 fix more comp. warns
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5833 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-04-06 00:10:14 +00:00
Marcelo Matus
7afe6bc139 normalizing the inout typemaps and other cosmetic fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5782 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-21 23:26:18 +00:00
Marcelo Matus
1d5529bcfc better STL support, see CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5755 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-03-17 09:41:19 +00:00
Marcelo Matus
68024b15ce Reducing pyrun.swg and splitting python.swg into different files
for clarity and for easier maintainance.

pyrun.swg almost the same than 1.3.20, therefore there will be
compatible again.

code generated is reduced by the use and reuse of %fragments.

as usual, all the test-suite is compiling and a much bigger
"test project" too.

with the new typemaps definition should be much eaiser and
uniform add stl/std and user types.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5706 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-10 09:50:24 +00:00
Logan Johnson
d562e7eef4 Be sure to initialize all of the fields of the PyTypeObject struct to
something, to avoid numerous compiler warnings.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5700 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-02-06 17:45:49 +00:00