]> git.saurik.com Git - wxWidgets.git/blob - wxPython/SWIG/swig-1.3.29.patch
Use correct DLL import/export specifier for multi-lib builds
[wxWidgets.git] / wxPython / SWIG / swig-1.3.29.patch
1 Index: Makefile.in
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 14 May 2006 18:29:39 -0000
8 @@ -21,9 +21,9 @@
9
10 source:
11 @cd $(SOURCE) && $(MAKE)
12
13 -libfiles: Lib/swigwarn.swg
14 +libfiles: $(srcdir)/Lib/swigwarn.swg
15
16 .PHONY: source libfiles
17
18 #####################################################################
19 @@ -339,9 +339,9 @@
20 #####################################################################
21 # Update the Lib/swigwarn.swg file
22 #####################################################################
23
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 14 May 2006 18:29:39 -0000
37 @@ -12,9 +12,9 @@
38
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 14 May 2006 18:29:39 -0000
55 @@ -39,9 +39,8 @@
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;
62
63 static String *methods;
64 static String *class_name;
65 @@ -669,9 +668,8 @@
66 }
67 Delete(filen); filen = NULL;
68
69 f_shadow = NewString("");
70 - f_shadow_imports = NewString("");
71 f_shadow_stubs = NewString("");
72
73 Swig_register_filebyname("shadow",f_shadow);
74 Swig_register_filebyname("python",f_shadow);
75 @@ -817,12 +815,8 @@
76 Printf(f_wrappers,"}\n");
77 Printf(f_wrappers,"#endif\n");
78
79 if (shadow) {
80 - /*
81 - Printf(f_shadow_imports,"\nimport %s\n", module);
82 - Printv(f_shadow_py, f_shadow_imports, "\n",NIL);
83 - */
84 Printv(f_shadow_py, f_shadow, "\n",NIL);
85 Printv(f_shadow_py, f_shadow_stubs, "\n",NIL);
86
87 Close(f_shadow_py);
88 @@ -882,14 +876,11 @@
89 }
90
91 // finally, output the name of the imported module
92 if (shadowimport) {
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);
98 - }
99 + if (!options || (!Getattr(options, "noshadow") && !Getattr(options, "noproxy"))) {
100 + Printf(import, "%s\n", modname);
101 + Printf(f_shadow, "%s", import);
102 }
103 }
104
105 Delete(import);
106 @@ -1154,10 +1145,15 @@
107
108 // Do the param type too?
109 if (showTypes) {
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");
116 + else {
117 + lookup = Swig_symbol_clookup(type, 0);
118 + if (lookup) type = Getattr(lookup, "sym:name");
119 + }
120 Printf(doc, "%s ", type);
121 }
122
123 if (name) {
124 Index: Source/Swig/misc.c
125 ===================================================================
126 RCS file: /cvsroot/swig/SWIG/Source/Swig/misc.c,v
127 retrieving revision 1.57
128 diff -u -4 -r1.57 misc.c
129 --- Source/Swig/misc.c 6 Mar 2006 22:51:00 -0000 1.57
130 +++ Source/Swig/misc.c 14 May 2006 18:29:39 -0000
131 @@ -899,8 +899,26 @@
132 }
133 #endif
134
135
136 +
137 +/* -----------------------------------------------------------------------------
138 + * Swig_string_wxpy()
139 + *
140 + * Drop a leading 'wx' for all wxNames, except for wxEVT*
141 + * ----------------------------------------------------------------------------- */
142 +String *Swig_string_wxpy(String *s) {
143 + String* ns = NewStringEmpty();
144 + char* cptr = Char(s);
145 + if (cptr[0] == 'w' && cptr[1] == 'x') {
146 + if ( ! (cptr[2] == 'E' && cptr[3] == 'V' && cptr[4] == 'T')) {
147 + ns = NewString(&cptr[2]);
148 + }
149 + }
150 + return ns;
151 +}
152 +
153 +
154 /* -----------------------------------------------------------------------------
155 * Swig_init()
156 *
157 * Initialize the SWIG core
158 @@ -928,8 +946,11 @@
159 DohEncoding("undercase", Swig_string_ucase);
160 DohEncoding("firstuppercase", Swig_string_first_upper);
161 DohEncoding("firstlowercase", Swig_string_first_lower);
162
163 + /* wxPython's rename encoder */
164 + DohEncoding("wxpy", Swig_string_wxpy);
165 +
166 /* Initialize the swig keys */
167 Swig_keys_init();
168
169 /* Initialize typemaps */