]>
Commit | Line | Data |
---|---|---|
eb0ac1ae AG |
1 | To: vim-dev@vim.org |
2 | Subject: Patch 6.2.139 | |
3 | Fcc: outbox | |
4 | From: Bram Moolenaar <Bram@moolenaar.net> | |
5 | Mime-Version: 1.0 | |
6 | Content-Type: text/plain; charset=ISO-8859-1 | |
7 | Content-Transfer-Encoding: 8bit | |
8 | ------------ | |
9 | ||
10 | Patch 6.2.139 | |
11 | Problem: Code is repeated in the two Perl files. | |
12 | Solution: Move common code from if_perl.xs and if_perlsfio.c to vim.h. | |
13 | Also fix a problem with generating prototypes. | |
14 | Files: src/if_perl.xs, src/if_perlsfio.c, src/vim.h | |
15 | ||
16 | ||
17 | *** ../vim-6.2.138/src/if_perl.xs Mon May 19 23:02:45 2003 | |
18 | --- src/if_perl.xs Wed Oct 29 12:26:30 2003 | |
19 | *************** | |
20 | *** 15,59 **** | |
21 | ||
22 | #include "vim.h" | |
23 | ||
24 | - /* | |
25 | - * Avoid clashes between Perl and Vim namespace. | |
26 | - */ | |
27 | - #undef NORMAL | |
28 | - #undef STRLEN | |
29 | - #undef FF | |
30 | - #undef OP_DELETE | |
31 | - #undef OP_JOIN | |
32 | - #ifdef __BORLANDC__ | |
33 | - # define NOPROTO 1 | |
34 | - #endif | |
35 | - /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */ | |
36 | - #ifdef MAX | |
37 | - # undef MAX | |
38 | - #endif | |
39 | - #ifdef MIN | |
40 | - # undef MIN | |
41 | - #endif | |
42 | - /* We use _() for gettext(), Perl uses it for function prototypes... */ | |
43 | - #ifdef _ | |
44 | - # undef _ | |
45 | - #endif | |
46 | - #ifdef DEBUG | |
47 | - # undef DEBUG | |
48 | - #endif | |
49 | - #ifdef _DEBUG | |
50 | - # undef _DEBUG | |
51 | - #endif | |
52 | - | |
53 | - #ifdef __BORLANDC__ | |
54 | - /* Borland has the structure stati64 but not _stati64 */ | |
55 | - # define _stati64 stati64 | |
56 | - #endif | |
57 | - | |
58 | - /* OK, nasty namespace hacking over... */ | |
59 | - | |
60 | - #include <EXTERN.h> | |
61 | - #include <perl.h> | |
62 | - #include <XSUB.h> | |
63 | ||
64 | /* | |
65 | * Work around clashes between Perl and Vim namespace. proto.h doesn't | |
66 | --- 15,20 ---- | |
67 | *************** | |
68 | *** 110,116 **** | |
69 | # define perl_free dll_perl_free | |
70 | # define Perl_get_context dll_Perl_get_context | |
71 | # define Perl_croak dll_Perl_croak | |
72 | ! # define Perl_croak_nocontext dll_Perl_croak_nocontext | |
73 | # define Perl_dowantarray dll_Perl_dowantarray | |
74 | # define Perl_free_tmps dll_Perl_free_tmps | |
75 | # define Perl_gv_stashpv dll_Perl_gv_stashpv | |
76 | --- 71,85 ---- | |
77 | # define perl_free dll_perl_free | |
78 | # define Perl_get_context dll_Perl_get_context | |
79 | # define Perl_croak dll_Perl_croak | |
80 | ! # ifndef PROTO | |
81 | ! # define Perl_croak_nocontext dll_Perl_croak_nocontext | |
82 | ! # define Perl_call_argv dll_Perl_call_argv | |
83 | ! # define Perl_call_pv dll_Perl_call_pv | |
84 | ! # define Perl_eval_sv dll_Perl_eval_sv | |
85 | ! # define Perl_get_sv dll_Perl_get_sv | |
86 | ! # define Perl_eval_pv dll_Perl_eval_pv | |
87 | ! # define Perl_call_method dll_Perl_call_method | |
88 | ! # endif | |
89 | # define Perl_dowantarray dll_Perl_dowantarray | |
90 | # define Perl_free_tmps dll_Perl_free_tmps | |
91 | # define Perl_gv_stashpv dll_Perl_gv_stashpv | |
92 | *************** | |
93 | *** 120,131 **** | |
94 | # define Perl_newSV dll_Perl_newSV | |
95 | # define Perl_newSViv dll_Perl_newSViv | |
96 | # define Perl_newSVpv dll_Perl_newSVpv | |
97 | - # define Perl_call_argv dll_Perl_call_argv | |
98 | - # define Perl_call_pv dll_Perl_call_pv | |
99 | - # define Perl_eval_sv dll_Perl_eval_sv | |
100 | - # define Perl_get_sv dll_Perl_get_sv | |
101 | - # define Perl_eval_pv dll_Perl_eval_pv | |
102 | - # define Perl_call_method dll_Perl_call_method | |
103 | # define Perl_pop_scope dll_Perl_pop_scope | |
104 | # define Perl_push_scope dll_Perl_push_scope | |
105 | # define Perl_save_int dll_Perl_save_int | |
106 | --- 89,94 ---- | |
107 | *** ../vim-6.2.138/src/if_perlsfio.c Tue Feb 13 15:02:49 2001 | |
108 | --- src/if_perlsfio.c Wed Oct 29 12:27:43 2003 | |
109 | *************** | |
110 | *** 15,47 **** | |
111 | ||
112 | #include "vim.h" | |
113 | ||
114 | - /* | |
115 | - * Avoid clashes between Perl and Vim namespace. | |
116 | - */ | |
117 | - #undef NORMAL | |
118 | - #undef STRLEN | |
119 | - #undef FF | |
120 | - #undef OP_DELETE | |
121 | - #undef OP_JOIN | |
122 | - /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */ | |
123 | - #ifdef MAX | |
124 | - # undef MAX | |
125 | - #endif | |
126 | - #ifdef MIN | |
127 | - # undef MIN | |
128 | - #endif | |
129 | - /* We use _() for gettext(), Perl uses it for function prototypes... */ | |
130 | - #ifdef _ | |
131 | - # undef _ | |
132 | - #endif | |
133 | - #ifdef DEBUG | |
134 | - # undef DEBUG | |
135 | - #endif | |
136 | - | |
137 | - #include <EXTERN.h> | |
138 | - #include <perl.h> | |
139 | - #include <XSUB.h> | |
140 | - | |
141 | #if defined(USE_SFIO) || defined(PROTO) | |
142 | ||
143 | #ifndef USE_SFIO /* just generating prototypes */ | |
144 | --- 15,20 ---- | |
145 | *** ../vim-6.2.138/src/vim.h Wed Oct 29 14:37:09 2003 | |
146 | --- src/vim.h Wed Oct 29 12:51:00 2003 | |
147 | *************** | |
148 | *** 1714,1717 **** | |
149 | --- 1714,1763 ---- | |
150 | # define nbdebug(a) | |
151 | #endif | |
152 | ||
153 | + #ifdef IN_PERL_FILE | |
154 | + /* | |
155 | + * Avoid clashes between Perl and Vim namespace. | |
156 | + */ | |
157 | + # undef NORMAL | |
158 | + # undef STRLEN | |
159 | + # undef FF | |
160 | + # undef OP_DELETE | |
161 | + # undef OP_JOIN | |
162 | + # ifdef __BORLANDC__ | |
163 | + # define NOPROTO 1 | |
164 | + # endif | |
165 | + /* remove MAX and MIN, included by glib.h, redefined by sys/param.h */ | |
166 | + # ifdef MAX | |
167 | + # undef MAX | |
168 | + # endif | |
169 | + # ifdef MIN | |
170 | + # undef MIN | |
171 | + # endif | |
172 | + /* We use _() for gettext(), Perl uses it for function prototypes... */ | |
173 | + # ifdef _ | |
174 | + # undef _ | |
175 | + # endif | |
176 | + # ifdef DEBUG | |
177 | + # undef DEBUG | |
178 | + # endif | |
179 | + # ifdef _DEBUG | |
180 | + # undef _DEBUG | |
181 | + # endif | |
182 | + # ifdef instr | |
183 | + # undef instr | |
184 | + # endif | |
185 | + # ifdef bool | |
186 | + # undef bool | |
187 | + # endif | |
188 | + | |
189 | + # ifdef __BORLANDC__ | |
190 | + /* Borland has the structure stati64 but not _stati64 */ | |
191 | + # define _stati64 stati64 | |
192 | + # endif | |
193 | + | |
194 | + # include <EXTERN.h> | |
195 | + # include <perl.h> | |
196 | + # include <XSUB.h> | |
197 | + #endif | |
198 | + | |
199 | #endif /* VIM__H */ | |
200 | *** ../vim-6.2.138/src/version.c Wed Oct 29 14:40:27 2003 | |
201 | --- src/version.c Wed Oct 29 14:42:42 2003 | |
202 | *************** | |
203 | *** 639,640 **** | |
204 | --- 639,642 ---- | |
205 | { /* Add new patch number below this line */ | |
206 | + /**/ | |
207 | + 139, | |
208 | /**/ | |
209 | ||
210 | -- | |
211 | [Autumn changed into Winter ... Winter changed into Spring ... Spring | |
212 | changed back into Autumn and Autumn gave Winter and Spring a miss and | |
213 | went straight on into Summer ... Until one day ...] | |
214 | "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD | |
215 | ||
216 | /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ | |
217 | /// Creator of Vim - Vi IMproved -- http://www.Vim.org \\\ | |
218 | \\\ Project leader for A-A-P -- http://www.A-A-P.org /// | |
219 | \\\ Help AIDS victims, buy here: http://ICCF-Holland.org/click1.html /// |