X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6977316f8d12a8d78f5774dbbe7cea4a45d98443..b515af7a75c346262c6a4fb17f613aab83227d65:/wxPython/SWIG/swig.python-docstring.patch diff --git a/wxPython/SWIG/swig.python-docstring.patch b/wxPython/SWIG/swig.python-docstring.patch index 808f6897b0..03ede92d80 100644 --- a/wxPython/SWIG/swig.python-docstring.patch +++ b/wxPython/SWIG/swig.python-docstring.patch @@ -1,16 +1,15 @@ Index: Source/Modules/python.cxx =================================================================== RCS file: /cvsroot/SWIG/Source/Modules/python.cxx,v -retrieving revision 1.28 -diff -u -4 -r1.28 python.cxx ---- Source/Modules/python.cxx 18 Nov 2003 20:19:15 -0000 1.28 -+++ Source/Modules/python.cxx 27 Nov 2003 00:52:28 -0000 -@@ -67,8 +67,19 @@ - -new_repr - Use more informative version of __repr__ in proxy classes\n\ - -noexcept - No automatic exception handling\n\ - -noproxy - Don't generate proxy classes \n\n"; +retrieving revision 1.35 +diff -u -4 -r1.35 python.cxx +--- Source/Modules/python.cxx 13 Dec 2003 23:52:31 -0000 1.35 ++++ Source/Modules/python.cxx 19 Dec 2003 02:04:45 -0000 +@@ -54,8 +54,17 @@ + static int have_constructor; + static int have_repr; + static String *real_classname; -+ +/* flags for the make_autodoc function */ +enum autodoc_t { + AUTODOC_CLASS, @@ -20,12 +19,11 @@ diff -u -4 -r1.28 python.cxx + AUTODOC_FUNC +}; + -+ - class PYTHON : public Language { - public: - - /* ------------------------------------------------------------ -@@ -414,17 +425,23 @@ + static const char *usage = (char *)"\ + Python Options (available with -python)\n\ + -ldflags - Print runtime libraries to link with\n\ + -globals - Set used to access C global variable [default: 'cvar']\n\ +@@ -417,17 +426,23 @@ * functions. * ------------------------------------------------------------ */ @@ -54,7 +52,7 @@ diff -u -4 -r1.28 python.cxx } -@@ -438,8 +455,246 @@ +@@ -441,8 +456,256 @@ } @@ -201,10 +199,15 @@ diff -u -4 -r1.28 python.cxx + if (Strcmp(type, "void") == 0) + type = NULL; + else { -+ type = SwigType_base(type); -+ Node* 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 { ++ type = SwigType_base(type); ++ Node* lookup = Swig_symbol_clookup(type, 0); ++ if (lookup) ++ type = Getattr(lookup, "sym:name"); ++ } + } + } + @@ -269,9 +272,14 @@ diff -u -4 -r1.28 python.cxx + // Do the param type too? + if (showTypes) { + SwigType* type = SwigType_base(Getattr(p, "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); + } + @@ -301,7 +309,7 @@ diff -u -4 -r1.28 python.cxx * Check if there is a %addtofunc directive and it has text * ------------------------------------------------------------ */ -@@ -1660,9 +1915,11 @@ +@@ -1700,9 +1963,11 @@ Printf(f_shadow, modern ? "(object)" : "(_object)"); } } @@ -314,7 +322,7 @@ diff -u -4 -r1.28 python.cxx Printv(f_shadow,tab4,"__swig_setmethods__ = {}\n",NIL); if (Len(base_class)) { Printf(f_shadow,"%sfor _s in [%s]: __swig_setmethods__.update(_s.__swig_setmethods__)\n",tab4,base_class); -@@ -1795,16 +2052,22 @@ +@@ -1835,16 +2100,22 @@ Delete(pyaction); Printv(f_shadow,pycode,"\n",NIL); } else { @@ -344,7 +352,7 @@ diff -u -4 -r1.28 python.cxx } } -@@ -1819,14 +2082,20 @@ +@@ -1859,14 +2130,20 @@ virtual int staticmemberfunctionHandler(Node *n) { String *symname = Getattr(n,"sym:name"); Language::staticmemberfunctionHandler(n); @@ -369,7 +377,7 @@ diff -u -4 -r1.28 python.cxx " = staticmethod(", symname, ")\n", NIL); if (!modern) { -@@ -1911,8 +2180,10 @@ +@@ -1951,8 +2228,10 @@ } Printv(f_shadow, tab4, "def __init__(self, *args", @@ -380,7 +388,7 @@ diff -u -4 -r1.28 python.cxx if (!modern) { Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ", funcCallHelper(Swig_name_construct(symname), allow_kwargs), ")\n", NIL); -@@ -1926,9 +2197,9 @@ +@@ -1966,9 +2245,9 @@ Printv(f_shadow, tab8, "self.thisown = 1\n", NIL); Printv(f_shadow, tab8, "del newobj.thisown\n", NIL); } @@ -391,7 +399,7 @@ diff -u -4 -r1.28 python.cxx } have_constructor = 1; } else { -@@ -1944,8 +2215,10 @@ +@@ -1984,8 +2263,10 @@ } else { Printv(f_shadow_stubs, "\ndef ", symname, "(*args", @@ -402,7 +410,7 @@ diff -u -4 -r1.28 python.cxx funcCallHelper(Swig_name_construct(symname), allow_kwargs), "\n", NIL); Printv(f_shadow_stubs, tab4, "val.thisown = 1\n", NIL); if ( have_addtofunc(n) ) -@@ -1977,13 +2250,15 @@ +@@ -2017,13 +2298,15 @@ Delete(pyaction); Printv(f_shadow,pycode,"\n", NIL); } else {