2 ===================================================================
 
   3 RCS file: /cvsroot/swig/SWIG/Makefile.in,v
 
   4 retrieving revision 1.103
 
   5 diff -u -4 -r1.103 Makefile.in
 
   6 --- Makefile.in 10 Mar 2006 22:54:02 -0000      1.103
 
   7 +++ Makefile.in 5 Jul 2006 00:50:18 -0000
 
  11         @cd $(SOURCE) && $(MAKE)
 
  13 -libfiles: Lib/swigwarn.swg
 
  14 +libfiles: $(srcdir)/Lib/swigwarn.swg
 
  16  .PHONY: source libfiles
 
  18  #####################################################################
 
  20  #####################################################################
 
  21  # Update the Lib/swigwarn.swg file
 
  22  #####################################################################
 
  24 -Lib/swigwarn.swg: Source/Include/swigwarn.h
 
  25 +$(srcdir)/Lib/swigwarn.swg: $(srcdir)/Source/Include/swigwarn.h
 
  26         echo "/* Automatically generated file containing all the swig warning codes.  */" > $@
 
  27         echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h'  */" >> $@
 
  28         echo  "/* and use the command 'make Lib/swigwarn.swg' instead.                 */" >> $@
 
  29         echo >> $@; echo >> $@
 
  30 Index: Lib/typemaps/exception.swg
 
  31 ===================================================================
 
  32 RCS file: /cvsroot/swig/SWIG/Lib/typemaps/exception.swg,v
 
  33 retrieving revision 1.8
 
  34 diff -u -4 -r1.8 exception.swg
 
  35 --- Lib/typemaps/exception.swg  7 Mar 2006 00:14:10 -0000       1.8
 
  36 +++ Lib/typemaps/exception.swg  5 Jul 2006 00:50:18 -0000
 
  39  /* macros for error manipulation */
 
  40  #define %nullref_fmt()                     "invalid null reference "              
 
  41  #define %varfail_fmt(_type,_name)          "in variable '"`_name`"' of type '"`_type`"'"
 
  42 -#define %argfail_fmt(_type,_name,_argn)    "in method '" `_name` "', argument " `_argn`" of type '" `_type`"'"
 
  43 +#define %argfail_fmt(_type,_name,_argn)    "in method '" `_name` "', expected argument " `_argn`" of type '" `_type`"'"
 
  44  #define %outfail_fmt(_type)                "in output value of type '"_type"'"    
 
  45  #define %argnullref_fmt(_type,_name,_argn) %nullref_fmt() %argfail_fmt(_type, _name, _argn)  
 
  46  #define %varnullref_fmt(_type,_name)       %nullref_fmt() %varfail_fmt(_type, _name)              
 
  47  #define %outnullref_fmt(_type)             %nullref_fmt() %outfail_fmt(_type)         
 
  48 Index: Source/Modules/python.cxx
 
  49 ===================================================================
 
  50 RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v
 
  51 retrieving revision 1.203
 
  52 diff -u -4 -r1.203 python.cxx
 
  53 --- Source/Modules/python.cxx   16 Mar 2006 01:46:50 -0000      1.203
 
  54 +++ Source/Modules/python.cxx   5 Jul 2006 00:50:19 -0000
 
  56  static  File         *f_directors_h = 0;
 
  57  static  File         *f_init = 0;
 
  58  static  File         *f_shadow_py = 0;
 
  59  static  String       *f_shadow = 0;
 
  60 -static  String       *f_shadow_imports = 0;
 
  61  static  String       *f_shadow_stubs = 0;
 
  63  static  String       *methods;
 
  64  static  String       *class_name;
 
  67        Delete(filen); filen = NULL;
 
  69        f_shadow = NewString("");
 
  70 -      f_shadow_imports = NewString("");
 
  71        f_shadow_stubs = NewString("");
 
  73        Swig_register_filebyname("shadow",f_shadow);
 
  74        Swig_register_filebyname("python",f_shadow);
 
  76      Printf(f_wrappers,"}\n");
 
  77      Printf(f_wrappers,"#endif\n");
 
  81 -      Printf(f_shadow_imports,"\nimport %s\n", module);
 
  82 -      Printv(f_shadow_py, f_shadow_imports, "\n",NIL);
 
  84        Printv(f_shadow_py, f_shadow, "\n",NIL);
 
  85        Printv(f_shadow_py, f_shadow_stubs, "\n",NIL);
 
  91          // finally, output the name of the imported module
 
  93 -         if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {        
 
  94 -           Printf(import, "_%s\n", modname);
 
  95 -           if (!Strstr(f_shadow_imports, import)) {
 
  96 -             Printf(f_shadow, "import %s\n", modname);
 
  97 -             Printv(f_shadow_imports, import, NULL);
 
  99 +         if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {
 
 100 +            Printf(import, "%s\n", modname);
 
 101 +            Printf(f_shadow, "%s", import);
 
 106 @@ -1154,10 +1145,15 @@
 
 108        // Do the param type too?
 
 110          type =  SwigType_base(type);
 
 111 -       lookup = Swig_symbol_clookup(type, 0);
 
 112 -       if (lookup) type = Getattr(lookup, "sym:name");
 
 113 +        SwigType* qt = SwigType_typedef_resolve_all(type);
 
 114 +        if (SwigType_isenum(qt))
 
 115 +          type = NewString("int");
 
 117 +          lookup = Swig_symbol_clookup(type, 0);
 
 118 +          if (lookup) type = Getattr(lookup, "sym:name");
 
 120          Printf(doc, "%s ", type);
 
 124 @@ -2793,10 +2789,10 @@
 
 125           Printf(f_shadow_file,"%s.%s = new_instancemethod(%s.%s,None,%s)\n", 
 
 126                  class_name, symname, module, Swig_name_member(class_name,symname), class_name);
 
 129 -      Printf(f_shadow_file,"%s_swigregister = %s.%s_swigregister\n", class_name, module, class_name);
 
 130 -      Printf(f_shadow_file,"%s_swigregister(%s)\n", class_name, class_name,0);
 
 132 +      Printf(f_shadow_file,"%s.%s_swigregister(%s)\n", module, class_name, class_name);
 
 135        Printf(f_shadow_file,"%s\n", f_shadow_stubs);
 
 136        Clear(f_shadow_stubs);
 
 137 Index: Source/Swig/misc.c
 
 138 ===================================================================
 
 139 RCS file: /cvsroot/swig/SWIG/Source/Swig/misc.c,v
 
 140 retrieving revision 1.57
 
 141 diff -u -4 -r1.57 misc.c
 
 142 --- Source/Swig/misc.c  6 Mar 2006 22:51:00 -0000       1.57
 
 143 +++ Source/Swig/misc.c  5 Jul 2006 00:50:19 -0000
 
 150 +/* -----------------------------------------------------------------------------
 
 151 + * Swig_string_wxpy()
 
 153 + * Drop a leading 'wx' for all wxNames, except for wxEVT*
 
 154 + * ----------------------------------------------------------------------------- */
 
 155 +String *Swig_string_wxpy(String *s) {
 
 156 +  String* ns = NewStringEmpty();
 
 157 +  char* cptr = Char(s);
 
 158 +  if (cptr[0] == 'w' && cptr[1] == 'x') {
 
 159 +    if ( ! (cptr[2] == 'E' && cptr[3] == 'V' && cptr[4] == 'T')) {
 
 160 +      ns = NewString(&cptr[2]);
 
 167  /* -----------------------------------------------------------------------------
 
 170   * Initialize the SWIG core
 
 172    DohEncoding("undercase", Swig_string_ucase);
 
 173    DohEncoding("firstuppercase", Swig_string_first_upper);
 
 174    DohEncoding("firstlowercase", Swig_string_first_lower);
 
 176 +  /* wxPython's rename encoder */
 
 177 +  DohEncoding("wxpy", Swig_string_wxpy);
 
 179    /* Initialize the swig keys */
 
 182    /* Initialize typemaps */
 
 183 Index: Lib/python/pyinit.swg
 
 184 ===================================================================
 
 185 RCS file: /cvsroot/swig/SWIG/Lib/python/pyinit.swg,v
 
 186 retrieving revision 1.32
 
 187 diff -u -4 -r1.32 pyinit.swg
 
 188 --- Lib/python/pyinit.swg       2 Feb 2006 23:48:56 -0000       1.32
 
 189 +++ Lib/python/pyinit.swg       5 Jul 2006 00:50:19 -0000
 
 190 @@ -225,13 +225,13 @@
 
 191                        swig_type_info **types,
 
 192                        swig_type_info **types_initial) {
 
 194    for (i = 0; methods[i].ml_name; ++i) {
 
 195 -    char *c = methods[i].ml_doc;
 
 196 +    const char *c = methods[i].ml_doc;
 
 197      if (c && (c = strstr(c, "swig_ptr: "))) {
 
 199        swig_const_info *ci = 0;
 
 200 -      char *name = c + 10;
 
 201 +      const char *name = c + 10;
 
 202        for (j = 0; const_table[j].type; ++j) {
 
 203         if (strncmp(const_table[j].name, name, 
 
 204                     strlen(const_table[j].name)) == 0) {
 
 205           ci = &(const_table[j]);
 
 206 Index: Lib/python/pyrun.swg
 
 207 ===================================================================
 
 208 RCS file: /cvsroot/swig/SWIG/Lib/python/pyrun.swg,v
 
 209 retrieving revision 1.141
 
 210 diff -u -4 -r1.141 pyrun.swg
 
 211 --- Lib/python/pyrun.swg        7 Mar 2006 00:35:17 -0000       1.141
 
 212 +++ Lib/python/pyrun.swg        5 Jul 2006 00:50:19 -0000
 
 214   * ----------------------------------------------------------------------------- */
 
 216  /* Common SWIG API */
 
 218 +#if PY_VERSION_HEX < 0x02050000
 
 219 +typedef int Py_ssize_t;
 
 222  /* for raw pointers */
 
 223  #define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
 
 224  #define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
 
 225  #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
 
 226 @@ -1074,9 +1078,9 @@
 
 230      /* here we get the method pointer for callbacks */
 
 231 -    char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
 
 232 +    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
 
 233      const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
 
 235        desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
 
 236        if (!desc) return SWIG_ERROR;
 
 237 Index: Lib/python/pystrings.swg
 
 238 ===================================================================
 
 239 RCS file: /cvsroot/swig/SWIG/Lib/python/pystrings.swg,v
 
 240 retrieving revision 1.27
 
 241 diff -u -4 -r1.27 pystrings.swg
 
 242 --- Lib/python/pystrings.swg    23 Feb 2006 21:43:33 -0000      1.27
 
 243 +++ Lib/python/pystrings.swg    5 Jul 2006 00:50:19 -0000
 
 246  SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
 
 248    if (PyString_Check(obj)) {
 
 249 -    char *cstr; int len;
 
 250 +    char *cstr; Py_ssize_t len;
 
 251      PyString_AsStringAndSize(obj, &cstr, &len);