From: Robin Dunn Date: Tue, 14 Mar 2006 04:06:46 +0000 (+0000) Subject: SWIG 1.3.29 X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/ace78e271b95dc9eb6f72b475a9665847a60ae38?ds=sidebyside SWIG 1.3.29 git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38065 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/wxPython/SWIG/swig-1.3.29.patch b/wxPython/SWIG/swig-1.3.29.patch new file mode 100644 index 0000000000..8078c790a0 --- /dev/null +++ b/wxPython/SWIG/swig-1.3.29.patch @@ -0,0 +1,94 @@ +Index: Lib/typemaps/exception.swg +=================================================================== +RCS file: /cvsroot/swig/SWIG/Lib/typemaps/exception.swg,v +retrieving revision 1.8 +diff -u -4 -r1.8 exception.swg +--- Lib/typemaps/exception.swg 7 Mar 2006 00:14:10 -0000 1.8 ++++ Lib/typemaps/exception.swg 10 Mar 2006 00:39:14 -0000 +@@ -12,9 +12,9 @@ + + /* macros for error manipulation */ + #define %nullref_fmt() "invalid null reference " + #define %varfail_fmt(_type,_name) "in variable '"`_name`"' of type '"`_type`"'" +-#define %argfail_fmt(_type,_name,_argn) "in method '" `_name` "', argument " `_argn`" of type '" `_type`"'" ++#define %argfail_fmt(_type,_name,_argn) "in method '" `_name` "', expected argument " `_argn`" of type '" `_type`"'" + #define %outfail_fmt(_type) "in output value of type '"_type"'" + #define %argnullref_fmt(_type,_name,_argn) %nullref_fmt() %argfail_fmt(_type, _name, _argn) + #define %varnullref_fmt(_type,_name) %nullref_fmt() %varfail_fmt(_type, _name) + #define %outnullref_fmt(_type) %nullref_fmt() %outfail_fmt(_type) +Index: Source/Modules/python.cxx +=================================================================== +RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v +retrieving revision 1.202 +diff -u -4 -r1.202 python.cxx +--- Source/Modules/python.cxx 7 Mar 2006 22:02:54 -0000 1.202 ++++ Source/Modules/python.cxx 10 Mar 2006 00:39:14 -0000 +@@ -39,9 +39,8 @@ + static File *f_directors_h = 0; + static File *f_init = 0; + static File *f_shadow_py = 0; + static String *f_shadow = 0; +-static String *f_shadow_imports = 0; + static String *f_shadow_stubs = 0; + + static String *methods; + static String *class_name; +@@ -669,9 +668,8 @@ + } + Delete(filen); filen = NULL; + + f_shadow = NewString(""); +- f_shadow_imports = NewString(""); + f_shadow_stubs = NewString(""); + + Swig_register_filebyname("shadow",f_shadow); + Swig_register_filebyname("python",f_shadow); +@@ -817,12 +815,8 @@ + Printf(f_wrappers,"}\n"); + Printf(f_wrappers,"#endif\n"); + + if (shadow) { +- /* +- Printf(f_shadow_imports,"\nimport %s\n", module); +- Printv(f_shadow_py, f_shadow_imports, "\n",NIL); +- */ + Printv(f_shadow_py, f_shadow, "\n",NIL); + Printv(f_shadow_py, f_shadow_stubs, "\n",NIL); + + Close(f_shadow_py); +@@ -882,14 +876,11 @@ + } + + // finally, output the name of the imported module + if (shadowimport) { +- if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) { +- Printf(import, "_%s\n", modname); +- if (!Strstr(f_shadow_imports, import)) { +- Printf(f_shadow, "import %s\n", modname); +- Printv(f_shadow_imports, import, NULL); +- } ++ if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) { ++ Printf(import, "%s\n", modname); ++ Printf(f_shadow, "%s", import); + } + } + + Delete(import); +@@ -1154,10 +1145,15 @@ + + // Do the param type too? + if (showTypes) { + type = SwigType_base(type); +- lookup = Swig_symbol_clookup(type, 0); +- if (lookup) type = Getattr(lookup, "sym:name"); ++ SwigType* qt = SwigType_typedef_resolve_all(type); ++ if (SwigType_isenum(qt)) ++ type = NewString("int"); ++ else { ++ lookup = Swig_symbol_clookup(type, 0); ++ if (lookup) type = Getattr(lookup, "sym:name"); ++ } + Printf(doc, "%s ", type); + } + + if (name) { diff --git a/wxPython/b b/wxPython/b index 19f3569512..ef4867613f 100755 --- a/wxPython/b +++ b/wxPython/b @@ -6,6 +6,11 @@ if [ "$OSTYPE" = "cygwin" ]; then exit fi +# make it easy to switch versions of SWIG +if [ "$SWIG" = "" ]; then + SWIG=/opt/swig/bin/swig-1.3.29 +fi + function getpyver { if [ "$1" = "15" ]; then @@ -33,7 +38,7 @@ python$PYVER -c "import sys;print '\n', sys.version, '\n'" SETUP="python$PYVER -u setup.py" -FLAGS="USE_SWIG=1 SWIG=/opt/swig/bin/swig" +FLAGS="USE_SWIG=1 SWIG=$SWIG" OTHERFLAGS="" PORTFLAGS="" UNIFLAG="UNICODE=1" diff --git a/wxPython/config.py b/wxPython/config.py index d08949daf4..09e89eaf53 100644 --- a/wxPython/config.py +++ b/wxPython/config.py @@ -434,6 +434,18 @@ def run_swig(files, dir, gendir, package, USE_SWIG, force, swig_args, return sources +def swig_version(): + # It may come on either stdout or stderr, depending on the + # version, so read both. + i, o, e = os.popen3(SWIG + ' -version', 't') + stext = o.read() + e.read() + import re + match = re.search(r'[0-9]+\.[0-9]+\.[0-9]+$', stext, re.MULTILINE) + if not match: + raise 'NotFound' + SVER = match.group(0) + return SVER + # Specializations of some distutils command classes class wx_smart_install_data(distutils.command.install_data.install_data): @@ -883,6 +895,15 @@ swig_args = ['-c++', '-modern', '-D'+WXPLAT, ] + i_files_includes + +if USE_SWIG: + SVER = swig_version() + if int(SVER[-2:]) >= 29: + swig_args += [ '-fastdispatch', + '-fvirtual', + '-fastinit', + '-fastunpack', + ] if UNICODE: swig_args.append('-DwxUSE_UNICODE') diff --git a/wxPython/docs/CHANGES.txt b/wxPython/docs/CHANGES.txt index 2959ecd4ff..f441350fc1 100644 --- a/wxPython/docs/CHANGES.txt +++ b/wxPython/docs/CHANGES.txt @@ -100,11 +100,22 @@ methods. Added the wx.HVScrolledWindow class. +wxGTK: wx.ListBox and wx.CheckListBox are now using native GTK2 +widgets. + +Added wx.ListBox.HitTest() from patch 1446207 + +Bumped up to SWIG 1.3.29. This provides some more runtime performance +boosts, gets rid of the dreaded Ptr classes, and some other nice new +things. + + 2.6.3.0 ------- +* Mar-2006 Change the wx.ListCtrl InsertStringItem wrapper to use the form that takes an imageIndex, and set the default to -1. This ensures that on @@ -147,6 +158,32 @@ Added wx.GridSizer.CalcRowsCols. Added wx.OutputStream.LastWrite. +wxGTK: EVT_SET_CURSOR is now sent. + +wxGTK: Fix RequestMore for idle events. + +wxGTK: Implement user dashes for PS and GNOME printing. + +wxGTK: Correct update region code. Don't always invalidate the whole +window upon resize. Reenable support for thewx.NO_FULL_REPAINT_ON_RESIZE +flag. Also disable refreshing custom controls when focusing in and out. + +wx.lib.pubsub: Publisher is now able to parse a dotted notation string +into a topic tuple. For example: subscribing to "timer.clock.seconds" +is the same as subscribing to ("timer", "clock", "seconds"). + +Applied patch #1441370: lib.plot - allow passing in wx.Colour() + +Added wx.CommandEvent.GetClientData. + +Updated wxStyledTextCtrl to use version 1.67 of Scintilla. +NOTE: The STC_LEX_ASP and STC_LEX_PHP lexers have been deprecated, +you should use STC_LEX_HTML instead. + +wxSTC: Implemented Fix for SF Bug #1436503. Delay the start of the +DnD operation in case the user just intended to click, not drag. + + diff --git a/wxPython/include/wx/wxPython/swigver.h b/wxPython/include/wx/wxPython/swigver.h index bf90522a1c..facd705326 100644 --- a/wxPython/include/wx/wxPython/swigver.h +++ b/wxPython/include/wx/wxPython/swigver.h @@ -1,3 +1,3 @@ // This file was generated by setup.py -#define wxPy_SWIG_VERSION "SWIG-1.3.27" +#define wxPy_SWIG_VERSION "SWIG-1.3.29" diff --git a/wxPython/setup.py b/wxPython/setup.py index cdaa055bfc..0cab5788e2 100755 --- a/wxPython/setup.py +++ b/wxPython/setup.py @@ -82,24 +82,16 @@ CLEANUP.append('wx/__version__.py') if USE_SWIG: try: - # It may come on either stdout or stderr, depending on the - # version, so read both. - i, o, e = os.popen3(SWIG + ' -version', 't') - stext = o.read() + e.read() - import re - match = re.search(r'[0-9]+\.[0-9]+\.[0-9]+$', stext, re.MULTILINE) - if not match: - raise 'NotFound' - SVER = match.group(0) + SVER = swig_version() open('include/wx/wxPython/swigver.h', 'w').write('''\ // This file was generated by setup.py #define wxPy_SWIG_VERSION "SWIG-%s" ''' % SVER) msg('Using SWIG-' + SVER) - except: msg('\nUnable to get SWIG version number\n') + #---------------------------------------------------------------------- diff --git a/wxPython/src/_core_ex.py b/wxPython/src/_core_ex.py index 5ad0d81365..2b3fc646b4 100644 --- a/wxPython/src/_core_ex.py +++ b/wxPython/src/_core_ex.py @@ -266,7 +266,7 @@ class __DocFilter: obj = self._globals.get(name, None) if type(obj) not in [type, types.ClassType, types.FunctionType, types.BuiltinFunctionType]: return False - if name.startswith('_') or name.endswith('Ptr') or name.startswith('EVT'): + if name.startswith('_') or name.startswith('EVT') or name.endswith('_swigregister') or name.endswith('Ptr') : return False return True diff --git a/wxPython/src/_mimetype.i b/wxPython/src/_mimetype.i index 87b01295ec..8e71e13a6a 100644 --- a/wxPython/src/_mimetype.i +++ b/wxPython/src/_mimetype.i @@ -81,7 +81,7 @@ public: // get the array of all extensions const wxArrayString& GetExtensions() const; - int GetExtensionsCount() const; + size_t GetExtensionsCount() const; // get the icon info const wxString& GetIconFile() const;