]> git.saurik.com Git - wxWidgets.git/commitdiff
Updated SWIG patches for new CVS line numbers, also output "int" for
authorRobin Dunn <robin@alldunn.com>
Fri, 19 Dec 2003 04:39:38 +0000 (04:39 +0000)
committerRobin Dunn <robin@alldunn.com>
Fri, 19 Dec 2003 04:39:38 +0000 (04:39 +0000)
enum types in the autodoc strings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@24921 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

wxPython/SWIG/swig.python-docstring.patch
wxPython/SWIG/swig.xmlout.patch

index 8b121b1806f3b1ed0037cda4682b614ddaaf6b17..03ede92d80ea7893babb45e67cb77297ff7bde75 100644 (file)
@@ -1,10 +1,10 @@
 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
+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;
@@ -52,7 +52,7 @@ diff -u -4 -r1.33 python.cxx
    }
  
  
-@@ -441,8 +456,246 @@
+@@ -441,8 +456,256 @@
    }
  
  
@@ -199,10 +199,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");
++            }
 +          }     
 +        }
 +        
@@ -267,9 +272,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 +309,7 @@ diff -u -4 -r1.33 python.cxx
     *    Check if there is a %addtofunc directive and it has text
     * ------------------------------------------------------------ */
  
-@@ -1663,9 +1916,11 @@
+@@ -1700,9 +1963,11 @@
          Printf(f_shadow, modern ? "(object)" : "(_object)");
        }
        }
@@ -312,7 +322,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 @@
+@@ -1835,16 +2100,22 @@
          Delete(pyaction);
          Printv(f_shadow,pycode,"\n",NIL);
        } else {
@@ -342,7 +352,7 @@ diff -u -4 -r1.33 python.cxx
          }
  
        }
-@@ -1822,14 +2083,20 @@
+@@ -1859,14 +2130,20 @@
    virtual int staticmemberfunctionHandler(Node *n) {
      String *symname = Getattr(n,"sym:name");
      Language::staticmemberfunctionHandler(n);
@@ -367,7 +377,7 @@ diff -u -4 -r1.33 python.cxx
                 " = staticmethod(", symname, ")\n", NIL);
  
          if (!modern) {
-@@ -1914,8 +2181,10 @@
+@@ -1951,8 +2228,10 @@
            }
  
              Printv(f_shadow, tab4, "def __init__(self, *args",
@@ -378,7 +388,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 @@
+@@ -1966,9 +2245,9 @@
                Printv(f_shadow, tab8, "self.thisown = 1\n", NIL);
                Printv(f_shadow, tab8, "del newobj.thisown\n", NIL);
              }
@@ -389,7 +399,7 @@ diff -u -4 -r1.33 python.cxx
          }
          have_constructor = 1;
        } else {
-@@ -1947,8 +2216,10 @@
+@@ -1984,8 +2263,10 @@
          } else {
  
              Printv(f_shadow_stubs, "\ndef ", symname, "(*args",
@@ -400,7 +410,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 @@
+@@ -2017,13 +2298,15 @@
        Delete(pyaction);
        Printv(f_shadow,pycode,"\n", NIL);
        } else {
index 07d6590b8df54ff731a145afc8b9c326a904c773..6db8c876b9c9fcd393bbc1546f1358ba85448f44 100644 (file)
@@ -4,7 +4,7 @@ RCS file: /cvsroot/SWIG/Source/Swig/swig.h,v
 retrieving revision 1.76
 diff -u -4 -r1.76 swig.h
 --- Source/Swig/swig.h 11 Nov 2003 20:16:35 -0000      1.76
-+++ Source/Swig/swig.h 11 Dec 2003 19:45:06 -0000
++++ Source/Swig/swig.h 18 Dec 2003 22:03:45 -0000
 @@ -350,8 +350,10 @@
  extern void Swig_print_tags(File *obj, Node *root);
  extern void Swig_print_tree(Node *obj);
@@ -19,14 +19,14 @@ diff -u -4 -r1.76 swig.h
 Index: Source/Modules/main.cxx
 ===================================================================
 RCS file: /cvsroot/SWIG/Source/Modules/main.cxx,v
-retrieving revision 1.23
-diff -u -4 -r1.23 main.cxx
---- Source/Modules/main.cxx    8 Dec 2003 23:42:37 -0000       1.23
-+++ Source/Modules/main.cxx    11 Dec 2003 19:45:07 -0000
-@@ -85,15 +85,17 @@
-      -v              - Run in verbose mode\n\
-      -version        - Print SWIG version number\n\
+retrieving revision 1.27
+diff -u -4 -r1.27 main.cxx
+--- Source/Modules/main.cxx    16 Dec 2003 03:43:51 -0000      1.27
++++ Source/Modules/main.cxx    18 Dec 2003 22:03:45 -0000
+@@ -87,15 +87,17 @@
       -Wall           - Enable all warning messages\n\
+      -Wallkw         - Enable warning messages for all the languages keywords\n\
+      -Werror         - Force to treat the warnings as errors\n\
       -w<n>           - Suppress warning number <n>\n\
 +     -xmlout <file>  - Write an XML version of the parse tree to file after normal processing\n\
  \n";
@@ -41,7 +41,7 @@ diff -u -4 -r1.23 main.cxx
  // -----------------------------------------------------------------------------
  // check_suffix(char *name)
  //
-@@ -222,8 +224,9 @@
+@@ -224,8 +226,9 @@
    int     includecount = 0;
    extern  int check_suffix(char *);
    int     dump_tags = 0;
@@ -51,7 +51,7 @@ diff -u -4 -r1.23 main.cxx
    int     dump_typedef = 0;
    int     dump_classes = 0;
    int     werror = 0;
-@@ -482,8 +485,20 @@
+@@ -490,8 +493,20 @@
            Swig_mark_arg(i);
          } else if (strcmp(argv[i],"-dump_tree") == 0) {
            dump_tree = 1;
@@ -72,7 +72,7 @@ diff -u -4 -r1.23 main.cxx
            Swig_mark_arg(i);
            Swig_contract_mode_set(0);
          } else if (strcmp(argv[i],"-browse") == 0) {
-@@ -725,8 +740,11 @@
+@@ -736,8 +751,11 @@
        }
      }
      if (dump_tree) {
@@ -90,7 +90,7 @@ RCS file: /cvsroot/SWIG/Source/Modules/xml.cxx,v
 retrieving revision 1.8
 diff -u -4 -r1.8 xml.cxx
 --- Source/Modules/xml.cxx     31 Oct 2003 17:42:40 -0000      1.8
-+++ Source/Modules/xml.cxx     11 Dec 2003 19:45:07 -0000
++++ Source/Modules/xml.cxx     18 Dec 2003 22:03:45 -0000
 @@ -109,9 +109,9 @@
                                Printf(stderr,"*** Can't open '%s'\n", outfile);
                                SWIG_exit(EXIT_FAILURE);