]> git.saurik.com Git - wxWidgets.git/blame - wxPython/SWIG/swig-1.3.29.patch
SWIG 1.3.29 updates
[wxWidgets.git] / wxPython / SWIG / swig-1.3.29.patch
CommitLineData
ace78e27
RD
1Index: Lib/typemaps/exception.swg
2===================================================================
3RCS file: /cvsroot/swig/SWIG/Lib/typemaps/exception.swg,v
4retrieving revision 1.8
5diff -u -4 -r1.8 exception.swg
6--- Lib/typemaps/exception.swg 7 Mar 2006 00:14:10 -0000 1.8
0ae3258d 7+++ Lib/typemaps/exception.swg 17 Mar 2006 00:10:52 -0000
ace78e27
RD
8@@ -12,9 +12,9 @@
9
10 /* macros for error manipulation */
11 #define %nullref_fmt() "invalid null reference "
12 #define %varfail_fmt(_type,_name) "in variable '"`_name`"' of type '"`_type`"'"
13-#define %argfail_fmt(_type,_name,_argn) "in method '" `_name` "', argument " `_argn`" of type '" `_type`"'"
14+#define %argfail_fmt(_type,_name,_argn) "in method '" `_name` "', expected argument " `_argn`" of type '" `_type`"'"
15 #define %outfail_fmt(_type) "in output value of type '"_type"'"
16 #define %argnullref_fmt(_type,_name,_argn) %nullref_fmt() %argfail_fmt(_type, _name, _argn)
17 #define %varnullref_fmt(_type,_name) %nullref_fmt() %varfail_fmt(_type, _name)
18 #define %outnullref_fmt(_type) %nullref_fmt() %outfail_fmt(_type)
19Index: Source/Modules/python.cxx
20===================================================================
21RCS file: /cvsroot/swig/SWIG/Source/Modules/python.cxx,v
0ae3258d
RD
22retrieving revision 1.203
23diff -u -4 -r1.203 python.cxx
24--- Source/Modules/python.cxx 16 Mar 2006 01:46:50 -0000 1.203
25+++ Source/Modules/python.cxx 17 Mar 2006 00:10:52 -0000
ace78e27
RD
26@@ -39,9 +39,8 @@
27 static File *f_directors_h = 0;
28 static File *f_init = 0;
29 static File *f_shadow_py = 0;
30 static String *f_shadow = 0;
31-static String *f_shadow_imports = 0;
32 static String *f_shadow_stubs = 0;
33
34 static String *methods;
35 static String *class_name;
36@@ -669,9 +668,8 @@
37 }
38 Delete(filen); filen = NULL;
39
40 f_shadow = NewString("");
41- f_shadow_imports = NewString("");
42 f_shadow_stubs = NewString("");
43
44 Swig_register_filebyname("shadow",f_shadow);
45 Swig_register_filebyname("python",f_shadow);
46@@ -817,12 +815,8 @@
47 Printf(f_wrappers,"}\n");
48 Printf(f_wrappers,"#endif\n");
49
50 if (shadow) {
51- /*
52- Printf(f_shadow_imports,"\nimport %s\n", module);
53- Printv(f_shadow_py, f_shadow_imports, "\n",NIL);
54- */
55 Printv(f_shadow_py, f_shadow, "\n",NIL);
56 Printv(f_shadow_py, f_shadow_stubs, "\n",NIL);
57
58 Close(f_shadow_py);
59@@ -882,14 +876,11 @@
60 }
61
62 // finally, output the name of the imported module
63 if (shadowimport) {
64- if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {
65- Printf(import, "_%s\n", modname);
66- if (!Strstr(f_shadow_imports, import)) {
67- Printf(f_shadow, "import %s\n", modname);
68- Printv(f_shadow_imports, import, NULL);
69- }
70+ if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {
71+ Printf(import, "%s\n", modname);
72+ Printf(f_shadow, "%s", import);
73 }
74 }
75
76 Delete(import);
77@@ -1154,10 +1145,15 @@
78
79 // Do the param type too?
80 if (showTypes) {
81 type = SwigType_base(type);
82- lookup = Swig_symbol_clookup(type, 0);
83- if (lookup) type = Getattr(lookup, "sym:name");
84+ SwigType* qt = SwigType_typedef_resolve_all(type);
85+ if (SwigType_isenum(qt))
86+ type = NewString("int");
87+ else {
88+ lookup = Swig_symbol_clookup(type, 0);
89+ if (lookup) type = Getattr(lookup, "sym:name");
90+ }
91 Printf(doc, "%s ", type);
92 }
93
94 if (name) {