Commit graph

323 commits

Author SHA1 Message Date
Marcelo Matus
84065db35b fix error in bool
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6817 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-01 01:20:42 +00:00
Marcelo Matus
0a974f5943 fixes for void*
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6816 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-12-01 01:20:04 +00:00
Marcelo Matus
2ce0825686 Prabhu's fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6767 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-22 16:47:49 +00:00
Marcelo Matus
1f0ebfd56a 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@6765 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-21 19:44:08 +00:00
Marcelo Matus
677b97f07f fix error message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6764 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-21 19:43:16 +00:00
Marcelo Matus
9c5118bc7a 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@6763 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-21 19:36:26 +00:00
Marcelo Matus
e48b28473d remove bad typemap
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6760 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-19 20:44:35 +00:00
Marcelo Matus
121d73d58c 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@6759 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-19 20:40:20 +00:00
Marcelo Matus
0baa17ec05 allow to include the swig runtime code into external user libraries
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6752 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-18 00:37:33 +00:00
Marcelo Matus
e25ab5c0de add back support for specialize_std_vector/list/etc
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6741 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-15 22:59:47 +00:00
Marcelo Matus
b40f47a7fd more enum typemaps
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6730 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-15 20:55:53 +00:00
Marcelo Matus
47e0a3f07a add typemaps for vars +two dimensional arrays
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6729 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-15 20:55:20 +00:00
Marcelo Matus
6703ba49a0 better error message
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6708 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-10 23:00:49 +00:00
William S Fulton
ea4033dfb8 warning fixes for VC++
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6694 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-08 21:18:10 +00:00
Marcelo Matus
d4992f8f26 add missing %types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6683 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-07 02:22:29 +00:00
Marcelo Matus
e49611443e back to typemaps for size_t/ptrdiff_t. typedes don't work with std::vector
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6682 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-06 23:18:45 +00:00
Marcelo Matus
4960d9dcf8 going back to use COBJECTS, which is the safe option, before release
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6642 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-03 08:09:28 +00:00
John Lenz
62f5e6cf73 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@6626 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 21:26:39 +00:00
Marcelo Matus
30845a0c69 add #include <cwchar>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6619 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 17:08:15 +00:00
Marcelo Matus
75a937a0d4 more warns fixes
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6618 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 16:37:10 +00:00
Marcelo Matus
8ec5f847e5 fix warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6614 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-02 08:24:22 +00:00
Marcelo Matus
a5a372c304 add missing #include <string>
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6586 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 22:17:30 +00:00
Marcelo Matus
dce447e25d fix warnings for MS compiler
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6585 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-01 22:16:52 +00:00
Marcelo Matus
36219d31d8 don't use in error messages, it can generate extra entries in the symbol table
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6556 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-29 22:25:18 +00:00
Marcelo Matus
69e2c815fd split declaration and definition of Director
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6544 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-29 07:30:03 +00:00
Marcelo Matus
7c924a5636 fix for proper %apply
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6513 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 00:34:18 +00:00
Marcelo Matus
89771f9b61 fixes for macros + templates
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6512 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-26 00:33:36 +00:00
Marcelo Matus
dab4e48132 no more zero value accepted for pointers
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6498 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-25 19:11:25 +00:00
Marcelo Matus
4607dd57a9 fix ref+int overload
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6496 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-25 19:04:51 +00:00
Marcelo Matus
e0d8f56214 delete unused line
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6494 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-24 06:30:40 +00:00
Marcelo Matus
f7ae968d6b CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6477 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 22:36:52 +00:00
John Lenz
b83fe6bd77 - 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@6475 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 21:53:54 +00:00
Marcelo Matus
036f704a61 Add flag to enabla new C++ casting operators
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6470 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 18:37:39 +00:00
William S Fulton
79bec67051 fixes for directors and default arguments in the constructor
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6468 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 18:16:21 +00:00
Marcelo Matus
cafb3a1d73 CHANGES.current
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6466 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-21 10:34:49 +00:00
William S Fulton
31d1012b0a removed redundant valuewrapper feature
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6459 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-20 21:19:14 +00:00
Marcelo Matus
ce25f45c99 make %callback more uniform and usable
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6435 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 07:35:18 +00:00
Marcelo Matus
19ab048261 more docs/split and cleaning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6421 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:31:24 +00:00
Marcelo Matus
70cbbd9055 better size_t/ptrdiff_t mapping
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6420 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:28:16 +00:00
Marcelo Matus
b4aeb47d3c moving more enum typemaps here
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6419 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:27:06 +00:00
Marcelo Matus
7a90a47284 prevent to overide the pointer value when an error occurred
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6418 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-18 00:25:31 +00:00
John Lenz
4645346381 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@6390 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-16 18:23:59 +00:00
Marcelo Matus
024efdb6f6 add guards for swig/language extra methods and comments
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6386 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 17:58:14 +00:00
Marcelo Matus
a300b82163 isolate language independent STD/STL/C++ code + more documentation + cleaning
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6382 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-10 06:42:15 +00:00
Marcelo Matus
d3e460c673 since bad preprocessors around, we are going back to plain Types
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6378 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-08 16:09:06 +00:00
Marcelo Matus
cee113efe7 add cast to work with SwigValueWrapper and write the out enum types appart, as needed
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6375 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-08 09:11:09 +00:00
Marcelo Matus
a433214393 fix version check for python 2.3.0
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6372 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-07 23:00:57 +00:00
Marcelo Matus
c1ed709013 fix #if __cplusplus problem
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6347 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 16:51:22 +00:00
Marcelo Matus
3aba853aa0 fix warnings
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6341 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 08:28:38 +00:00
Marcelo Matus
a105903188 add patch 903150
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@6339 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-10-06 02:35:28 +00:00