X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1e9b37a2fadb82105b51470b53e31936dc39888d..45d67f33e03119fff883432a394c8e062158821e:/wxPython/SWIG/swig.python-docstring.patch diff --git a/wxPython/SWIG/swig.python-docstring.patch b/wxPython/SWIG/swig.python-docstring.patch index 8b121b1806..47aac607ab 100644 --- a/wxPython/SWIG/swig.python-docstring.patch +++ b/wxPython/SWIG/swig.python-docstring.patch @@ -1,11 +1,11 @@ Index: Source/Modules/python.cxx =================================================================== RCS file: /cvsroot/SWIG/Source/Modules/python.cxx,v -retrieving revision 1.33 -diff -u -4 -r1.33 python.cxx ---- Source/Modules/python.cxx 9 Dec 2003 02:52:07 -0000 1.33 -+++ Source/Modules/python.cxx 11 Dec 2003 18:11:22 -0000 -@@ -54,8 +54,17 @@ +retrieving revision 1.40 +diff -u -4 -r1.40 python.cxx +--- Source/Modules/python.cxx 24 Jan 2004 00:25:31 -0000 1.40 ++++ Source/Modules/python.cxx 30 Jan 2004 22:22:16 -0000 +@@ -50,8 +50,17 @@ static int have_constructor; static int have_repr; static String *real_classname; @@ -52,7 +52,7 @@ diff -u -4 -r1.33 python.cxx } -@@ -441,8 +456,246 @@ +@@ -441,8 +456,248 @@ } @@ -96,14 +96,6 @@ diff -u -4 -r1.33 python.cxx + have_auto = (autodoc != NULL && Len(autodoc) > 0); + } + -+// if ( have_auto && have_ds ) -+// doc = NewStringf("%s%s\n\n%s%s", triple_double, autodoc, str, triple_double); -+// else if ( !have_auto && have_ds ) -+// doc = NewStringf("%s%s%s", triple_double, str, triple_double); -+// else -+// doc = NewStringf("%s%s%s", triple_double, autodoc, triple_double); -+ -+ + // If there is more than one line then make docstrings like this: + // + // """ @@ -199,10 +191,15 @@ diff -u -4 -r1.33 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"); ++ } + } + } + @@ -219,7 +216,7 @@ diff -u -4 -r1.33 python.cxx + break; + + case AUTODOC_STATICFUNC: -+ Printf(doc, "%s.%s(%s)", class_name, symname, make_autodocParmList(n, showTypes)); ++ Printf(doc, "%s(%s)", symname, make_autodocParmList(n, showTypes)); + if (type) Printf(doc, " -> %s", type); + break; + @@ -267,9 +264,14 @@ diff -u -4 -r1.33 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); + } + @@ -299,7 +301,7 @@ diff -u -4 -r1.33 python.cxx * Check if there is a %addtofunc directive and it has text * ------------------------------------------------------------ */ -@@ -1663,9 +1916,11 @@ +@@ -1731,9 +1986,11 @@ Printf(f_shadow, modern ? "(object)" : "(_object)"); } } @@ -312,7 +314,7 @@ diff -u -4 -r1.33 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); -@@ -1798,16 +2053,22 @@ +@@ -1866,16 +2123,22 @@ Delete(pyaction); Printv(f_shadow,pycode,"\n",NIL); } else { @@ -342,7 +344,7 @@ diff -u -4 -r1.33 python.cxx } } -@@ -1822,14 +2083,20 @@ +@@ -1890,14 +2153,20 @@ virtual int staticmemberfunctionHandler(Node *n) { String *symname = Getattr(n,"sym:name"); Language::staticmemberfunctionHandler(n); @@ -367,7 +369,7 @@ diff -u -4 -r1.33 python.cxx " = staticmethod(", symname, ")\n", NIL); if (!modern) { -@@ -1914,8 +2181,10 @@ +@@ -1982,8 +2251,10 @@ } Printv(f_shadow, tab4, "def __init__(self, *args", @@ -378,7 +380,7 @@ diff -u -4 -r1.33 python.cxx if (!modern) { Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ", funcCallHelper(Swig_name_construct(symname), allow_kwargs), ")\n", NIL); -@@ -1929,9 +2198,9 @@ +@@ -1997,9 +2268,9 @@ Printv(f_shadow, tab8, "self.thisown = 1\n", NIL); Printv(f_shadow, tab8, "del newobj.thisown\n", NIL); } @@ -389,7 +391,7 @@ diff -u -4 -r1.33 python.cxx } have_constructor = 1; } else { -@@ -1947,8 +2216,10 @@ +@@ -2015,8 +2286,10 @@ } else { Printv(f_shadow_stubs, "\ndef ", symname, "(*args", @@ -400,7 +402,7 @@ diff -u -4 -r1.33 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) ) -@@ -1980,13 +2251,15 @@ +@@ -2048,13 +2321,15 @@ Delete(pyaction); Printv(f_shadow,pycode,"\n", NIL); } else {