]> git.pld-linux.org Git - packages/vim.git/blob - 7.2.387
- up to 7.2.436
[packages/vim.git] / 7.2.387
1 To: vim-dev@vim.org
2 Subject: Patch 7.2.387
3 Fcc: outbox
4 From: Bram Moolenaar <Bram@moolenaar.net>
5 Mime-Version: 1.0
6 Content-Type: text/plain; charset=UTF-8
7 Content-Transfer-Encoding: 8bit
8 ------------
9
10 Patch 7.2.387
11 Problem:    Ruby with MingW still doesn't build all versions.
12 Solution:   More #ifdefs for the  Ruby code. (Sergey Khorev)
13 Files:      src/if_ruby.c
14
15
16 *** ../vim-7.2.386/src/if_ruby.c        2010-02-24 15:47:58.000000000 +0100
17 --- src/if_ruby.c       2010-03-10 12:40:30.000000000 +0100
18 ***************
19 *** 39,46 ****
20   # define rb_cTrueClass                (*dll_rb_cTrueClass)
21   # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
22   /*
23 !  * On ver 1.8, all Ruby functions are exported with "__declspce(dllimport)"
24 !  * in ruby.h.  But it cause trouble for these variables, because it is
25    * defined in this file.  When defined this RUBY_EXPORT it modified to
26    * "extern" and be able to avoid this problem.
27    */
28 --- 39,46 ----
29   # define rb_cTrueClass                (*dll_rb_cTrueClass)
30   # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
31   /*
32 !  * On ver 1.8, all Ruby functions are exported with "__declspec(dllimport)"
33 !  * in ruby.h.  But it causes trouble for these variables, because it is
34    * defined in this file.  When defined this RUBY_EXPORT it modified to
35    * "extern" and be able to avoid this problem.
36    */
37 ***************
38 *** 53,58 ****
39 --- 53,65 ----
40   # undef _WIN32_WINNT
41   #endif
42   
43 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
44 + /* Ruby 1.9 defines a number of static functions which use rb_num2long and
45 +  * rb_int2big */
46 + # define rb_num2long rb_num2long_stub
47 + # define rb_int2big rb_int2big_stub
48 + #endif
49
50   #include <ruby.h>
51   #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
52   # include <ruby/encoding.h>
53 ***************
54 *** 159,165 ****
55   #define rb_str_concat                 dll_rb_str_concat
56   #define rb_str_new                    dll_rb_str_new
57   #define rb_str_new2                   dll_rb_str_new2
58 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
59   # define rb_errinfo                   dll_rb_errinfo
60   #else
61   # define ruby_errinfo                 (*dll_ruby_errinfo)
62 --- 166,179 ----
63   #define rb_str_concat                 dll_rb_str_concat
64   #define rb_str_new                    dll_rb_str_new
65   #define rb_str_new2                   dll_rb_str_new2
66 ! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
67 ! # define rb_string_value_ptr          dll_rb_string_value_ptr
68 ! # define rb_float_new                 dll_rb_float_new
69 ! # define rb_ary_new                   dll_rb_ary_new
70 ! # define rb_ary_push                  dll_rb_ary_push
71 ! #endif
72 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
73 !     || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
74   # define rb_errinfo                   dll_rb_errinfo
75   #else
76   # define ruby_errinfo                 (*dll_ruby_errinfo)
77 ***************
78 *** 226,232 ****
79   static VALUE (*dll_rb_str_concat) (VALUE, VALUE);
80   static VALUE (*dll_rb_str_new) (const char*, long);
81   static VALUE (*dll_rb_str_new2) (const char*);
82 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
83   static VALUE (*dll_rb_errinfo) (void);
84   #else
85   static VALUE *dll_ruby_errinfo;
86 --- 240,247 ----
87   static VALUE (*dll_rb_str_concat) (VALUE, VALUE);
88   static VALUE (*dll_rb_str_new) (const char*, long);
89   static VALUE (*dll_rb_str_new2) (const char*);
90 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
91 !     || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
92   static VALUE (*dll_rb_errinfo) (void);
93   #else
94   static VALUE *dll_ruby_errinfo;
95 ***************
96 *** 235,240 ****
97 --- 250,264 ----
98   static void (*dll_ruby_init_loadpath) (void);
99   static void (*dll_NtInitialize) (int*, char***);
100   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
101 + static char * (*dll_rb_string_value_ptr) (volatile VALUE*);
102 + static VALUE (*dll_rb_float_new) (double);
103 + static VALUE (*dll_rb_ary_new) (void);
104 + static VALUE (*dll_rb_ary_push) (VALUE, VALUE);
105 + #endif
106 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
107 + static VALUE (*dll_rb_int2big)(SIGNED_VALUE);
108 + #endif
109 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
110   static int (*dll_rb_w32_snprintf)(char*, size_t, const char*, ...);
111   #endif
112   
113 ***************
114 *** 246,251 ****
115 --- 270,286 ----
116   static VALUE (*dll_rb_sprintf) (const char*, ...);
117   #endif
118   
119 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
120 + static SIGNED_VALUE rb_num2long_stub(VALUE x)
121 + {
122 +     return dll_rb_num2long(x);
123 + }
124 + static VALUE rb_int2big_stub(SIGNED_VALUE x)
125 + {
126 +     return dll_rb_int2big(x);
127 + }
128 + #endif
129
130   static HINSTANCE hinstRuby = 0; /* Instance of ruby.dll */
131   
132   /*
133 ***************
134 *** 301,317 ****
135       {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat},
136       {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new},
137       {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2},
138 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
139       {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo},
140   #else
141       {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
142   #endif
143       {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
144       {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
145 !     {"NtInitialize", (RUBY_PROC*)&dll_NtInitialize},
146   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
147       {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
148   #endif
149   #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
150       {"ruby_script", (RUBY_PROC*)&dll_ruby_script},
151       {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
152 --- 336,368 ----
153       {"rb_str_concat", (RUBY_PROC*)&dll_rb_str_concat},
154       {"rb_str_new", (RUBY_PROC*)&dll_rb_str_new},
155       {"rb_str_new2", (RUBY_PROC*)&dll_rb_str_new2},
156 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
157 !     || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
158       {"rb_errinfo", (RUBY_PROC*)&dll_rb_errinfo},
159   #else
160       {"ruby_errinfo", (RUBY_PROC*)&dll_ruby_errinfo},
161   #endif
162       {"ruby_init", (RUBY_PROC*)&dll_ruby_init},
163       {"ruby_init_loadpath", (RUBY_PROC*)&dll_ruby_init_loadpath},
164 !     {
165 ! #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER < 19
166 !     "NtInitialize",
167 ! #else
168 !     "ruby_sysinit",
169 ! #endif
170 !                       (RUBY_PROC*)&dll_NtInitialize},
171   #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
172       {"rb_w32_snprintf", (RUBY_PROC*)&dll_rb_w32_snprintf},
173   #endif
174 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18
175 +     {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr},
176 +     {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new},
177 +     {"rb_ary_new", (RUBY_PROC*)&dll_rb_ary_new},
178 +     {"rb_ary_push", (RUBY_PROC*)&dll_rb_ary_push},
179 + #endif
180 + #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
181 +     {"rb_int2big", (RUBY_PROC*)&dll_rb_int2big},
182 + #endif
183   #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
184       {"ruby_script", (RUBY_PROC*)&dll_ruby_script},
185       {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
186 ***************
187 *** 569,575 ****
188   static void error_print(int state)
189   {
190   #ifndef DYNAMIC_RUBY
191 ! #if !(defined(RUBY_VERSION) &&  RUBY_VERSION >= 19)
192       RUBYEXTERN VALUE ruby_errinfo;
193   #endif
194   #endif
195 --- 620,627 ----
196   static void error_print(int state)
197   {
198   #ifndef DYNAMIC_RUBY
199 ! #if !(defined(RUBY_VERSION) && RUBY_VERSION >= 19) \
200 !     && !(defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19)
201       RUBYEXTERN VALUE ruby_errinfo;
202   #endif
203   #endif
204 ***************
205 *** 605,611 ****
206         break;
207       case TAG_RAISE:
208       case TAG_FATAL:
209 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19
210         eclass = CLASS_OF(rb_errinfo());
211         einfo = rb_obj_as_string(rb_errinfo());
212   #else
213 --- 657,664 ----
214         break;
215       case TAG_RAISE:
216       case TAG_FATAL:
217 ! #if defined(RUBY_VERSION) && RUBY_VERSION >= 19 \
218 !     || defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19
219         eclass = CLASS_OF(rb_errinfo());
220         einfo = rb_obj_as_string(rb_errinfo());
221   #else
222 *** ../vim-7.2.386/src/version.c        2010-03-10 12:24:44.000000000 +0100
223 --- src/version.c       2010-03-10 12:45:55.000000000 +0100
224 ***************
225 *** 683,684 ****
226 --- 683,686 ----
227   {   /* Add new patch number below this line */
228 + /**/
229 +     387,
230   /**/
231
232 -- 
233 Vim is like Emacs without all the typing.  (John "Johann" Spetz)
234
235  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
236 ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
237 \\\        download, build and distribute -- http://www.A-A-P.org        ///
238  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
This page took 0.060343 seconds and 3 git commands to generate.