]> git.saurik.com Git - wxWidgets.git/blobdiff - wxPython/SWIG/swig.python-docstring.patch
Insure suitable choices of path/drive separator on OS/2.
[wxWidgets.git] / wxPython / SWIG / swig.python-docstring.patch
index a6dd0c57c1621b4cd1cd2baf96df748d45a01ced..a25ab5ecd457dbdc55036f3469976e79263f3bd9 100644 (file)
@@ -1,11 +1,11 @@
 Index: Source/Modules/python.cxx
 ===================================================================
 RCS file: /cvsroot/SWIG/Source/Modules/python.cxx,v
-retrieving revision 1.27
-diff -u -r1.27 python.cxx
---- Source/Modules/python.cxx  12 Nov 2003 17:14:00 -0000      1.27
-+++ Source/Modules/python.cxx  19 Nov 2003 06:23:46 -0000
-@@ -315,6 +315,17 @@
+retrieving revision 1.28
+diff -u -r1.28 python.cxx
+--- Source/Modules/python.cxx  18 Nov 2003 20:19:15 -0000      1.28
++++ Source/Modules/python.cxx  21 Nov 2003 16:56:31 -0000
+@@ -68,6 +68,17 @@
       -noexcept       - No automatic exception handling\n\
       -noproxy        - Don't generate proxy classes \n\n";
  
@@ -23,7 +23,7 @@ diff -u -r1.27 python.cxx
  class PYTHON : public Language {
  public:
  
-@@ -662,15 +673,21 @@
+@@ -415,15 +426,21 @@
     * ------------------------------------------------------------ */
  
    void emitFunctionShadowHelper(Node *n, File *f_dest, String *name, int kw) {
@@ -49,7 +49,7 @@ diff -u -r1.27 python.cxx
      }
    }
  
-@@ -686,6 +703,193 @@
+@@ -439,6 +456,200 @@
  
  
    /* ------------------------------------------------------------
@@ -118,18 +118,8 @@ diff -u -r1.27 python.cxx
 +  String* make_autodoc(Node *n, autodoc_t ad_type) {
 +
 +    if (ad_type == AUTODOC_CLASS)
-+      return NULL;  // No function call do document in this case
++      return NULL;  // No function call to document in this case
 +
-+    // check how should the parameters be rendered?
-+    String* autodoc = Getattr(n, "feature:autodoc");
-+    bool showTypes;
-+    if (Strcmp(autodoc, "0") == 0)
-+      showTypes = false;
-+    else if (Strcmp(autodoc, "1") == 0)
-+      showTypes = true;
-+    else
-+      return autodoc;
-+    
 +    // If the function is overloaded then this funciton is called
 +    // for the last one.  Rewind to the first so the docstrings are
 +    // in order.
@@ -138,6 +128,22 @@ diff -u -r1.27 python.cxx
 +    
 +    String* doc  = NewString("");
 +    while (n) {
++      bool showTypes = false;
++      bool skipAuto = false;
++      
++      // check how should the parameters be rendered?
++      String* autodoc = Getattr(n, "feature:autodoc");
++      if (Strcmp(autodoc, "0") == 0)
++        showTypes = false;
++      else if (Strcmp(autodoc, "1") == 0)
++        showTypes = true;
++      else {
++        // if not "0" or "1" then autodoc is already the string that should be used
++        Printf(doc, "%s", autodoc);
++        skipAuto = true;
++      }
++
++      if (!skipAuto) {
 +        String*   symname = Getattr(n, "sym:name");
 +        SwigType* type    = Getattr(n, "type");
 +      
@@ -149,7 +155,7 @@ diff -u -r1.27 python.cxx
 +            Node* lookup = Swig_symbol_clookup(type, 0);
 +            if (lookup)
 +              type = Getattr(lookup, "sym:name");
-+          }
++          }     
 +        }
 +        
 +        switch ( ad_type ) {
@@ -163,7 +169,7 @@ diff -u -r1.27 python.cxx
 +        case AUTODOC_DTOR:
 +          Printf(doc, "__del__()");
 +          break;
-+            
++        
 +        case AUTODOC_STATICFUNC:
 +          Printf(doc, "%s.%s(%s)", class_name, symname, make_autodocParmList(n, showTypes));
 +          if (type) Printf(doc, " -> %s", type);
@@ -174,11 +180,12 @@ diff -u -r1.27 python.cxx
 +          if (type) Printf(doc, " -> %s", type);
 +          break;            
 +        }
-+
-+        // if it's overloaded then get the next decl and loop around again
-+        n = Getattr(n, "sym:nextSibling");
-+        if (n)
-+          Printf(doc, "\n");
++      }
++      
++      // if it's overloaded then get the next decl and loop around again
++      n = Getattr(n, "sym:nextSibling");
++      if (n)
++        Printf(doc, "\n");
 +    }
 +          
 +    return doc;
@@ -243,7 +250,7 @@ diff -u -r1.27 python.cxx
     * have_addtofunc()
     *    Check if there is a %addtofunc directive and it has text
     * ------------------------------------------------------------ */
-@@ -1908,7 +2112,9 @@
+@@ -1661,7 +1872,9 @@
        }
        }
        Printf(f_shadow,":\n");
@@ -254,7 +261,7 @@ diff -u -r1.27 python.cxx
        if (!modern) {
          Printv(f_shadow,tab4,"__swig_setmethods__ = {}\n",NIL);
          if (Len(base_class)) {
-@@ -2043,14 +2249,20 @@
+@@ -1796,14 +2009,20 @@
          Printv(f_shadow,pycode,"\n",NIL);
        } else {
  
@@ -282,7 +289,7 @@ diff -u -r1.27 python.cxx
            }
          }
  
-@@ -2067,12 +2279,18 @@
+@@ -1820,12 +2039,18 @@
      String *symname = Getattr(n,"sym:name");
      Language::staticmemberfunctionHandler(n);
      if (shadow) {
@@ -305,7 +312,7 @@ diff -u -r1.27 python.cxx
          Printv(f_shadow, tab4, modern ? "" : "if _newclass:",  symname,
                 " = staticmethod(", symname, ")\n", NIL);
  
-@@ -2159,6 +2377,8 @@
+@@ -1912,6 +2137,8 @@
  
              Printv(f_shadow, tab4, "def __init__(self, *args",
                     (allow_kwargs ? ", **kwargs" : ""), "):\n", NIL);
@@ -314,7 +321,7 @@ diff -u -r1.27 python.cxx
              Printv(f_shadow, pass_self, NIL);
              if (!modern) {
                Printv(f_shadow, tab8, "_swig_setattr(self, ", rclassname, ", 'this', ", 
-@@ -2174,7 +2394,7 @@
+@@ -1927,7 +2154,7 @@
                Printv(f_shadow, tab8, "del newobj.thisown\n", NIL);
              }
              if ( have_addtofunc(n) )
@@ -323,7 +330,7 @@ diff -u -r1.27 python.cxx
            Delete(pass_self);
          }
          have_constructor = 1;
-@@ -2192,6 +2412,8 @@
+@@ -1945,6 +2172,8 @@
  
              Printv(f_shadow_stubs, "\ndef ", symname, "(*args",
                     (allow_kwargs ? ", **kwargs" : ""), "):\n", NIL);
@@ -332,7 +339,7 @@ diff -u -r1.27 python.cxx
              Printv(f_shadow_stubs, tab4, "val = ",
                     funcCallHelper(Swig_name_construct(symname), allow_kwargs), "\n", NIL);
            Printv(f_shadow_stubs, tab4, "val.thisown = 1\n", NIL);
-@@ -2225,11 +2447,13 @@
+@@ -1978,11 +2207,13 @@
        Printv(f_shadow,pycode,"\n", NIL);
        } else {
        Printv(f_shadow, tab4, "def __del__(self, destroy=", module, ".", Swig_name_destroy(symname), "):\n", NIL);