Mercurial > vim
comparison src/if_ruby.c @ 5766:b0a9df477096 v7.4.227
updated for version 7.4.227
Problem: Can't build with Ruby 1.8.
Solution: Do include a check for the Ruby version. (Ken Takata)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Fri, 28 Mar 2014 21:58:21 +0100 |
parents | eeb150c07647 |
children | 7623d953d3bc |
comparison
equal
deleted
inserted
replaced
5765:fb9937c5bd23 | 5766:b0a9df477096 |
---|---|
86 * rb_int2big */ | 86 * rb_int2big */ |
87 # define rb_num2long rb_num2long_stub | 87 # define rb_num2long rb_num2long_stub |
88 # define rb_int2big rb_int2big_stub | 88 # define rb_int2big rb_int2big_stub |
89 #endif | 89 #endif |
90 | 90 |
91 #if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG | 91 #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \ |
92 /* Ruby 2.0 defines a number of static functions which use rb_fix2int and | 92 && VIM_SIZEOF_INT < VIM_SIZEOF_LONG |
93 /* Ruby 1.9 defines a number of static functions which use rb_fix2int and | |
93 * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ | 94 * rb_num2int if VIM_SIZEOF_INT < VIM_SIZEOF_LONG (64bit) */ |
94 # define rb_fix2int rb_fix2int_stub | 95 # define rb_fix2int rb_fix2int_stub |
95 # define rb_num2int rb_num2int_stub | 96 # define rb_num2int rb_num2int_stub |
96 #endif | 97 #endif |
97 | 98 |
200 # define rb_hash_aset dll_rb_hash_aset | 201 # define rb_hash_aset dll_rb_hash_aset |
201 # define rb_hash_new dll_rb_hash_new | 202 # define rb_hash_new dll_rb_hash_new |
202 # define rb_inspect dll_rb_inspect | 203 # define rb_inspect dll_rb_inspect |
203 # define rb_int2inum dll_rb_int2inum | 204 # define rb_int2inum dll_rb_int2inum |
204 # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ | 205 # if VIM_SIZEOF_INT < VIM_SIZEOF_LONG /* 64 bits only */ |
206 # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER <= 18 | |
207 # define rb_fix2int dll_rb_fix2int | |
208 # define rb_num2int dll_rb_num2int | |
209 # endif | |
205 # define rb_num2uint dll_rb_num2uint | 210 # define rb_num2uint dll_rb_num2uint |
206 # endif | 211 # endif |
207 # define rb_lastline_get dll_rb_lastline_get | 212 # define rb_lastline_get dll_rb_lastline_get |
208 # define rb_lastline_set dll_rb_lastline_set | 213 # define rb_lastline_set dll_rb_lastline_set |
209 # define rb_load_protect dll_rb_load_protect | 214 # define rb_load_protect dll_rb_load_protect |
387 } | 392 } |
388 VALUE rb_int2big_stub(SIGNED_VALUE x) | 393 VALUE rb_int2big_stub(SIGNED_VALUE x) |
389 { | 394 { |
390 return dll_rb_int2big(x); | 395 return dll_rb_int2big(x); |
391 } | 396 } |
392 # if defined(DYNAMIC_RUBY_VER) && VIM_SIZEOF_INT < VIM_SIZEOF_LONG | 397 # if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 19 \ |
398 && VIM_SIZEOF_INT < VIM_SIZEOF_LONG | |
393 long rb_fix2int_stub(VALUE x) | 399 long rb_fix2int_stub(VALUE x) |
394 { | 400 { |
395 return dll_rb_fix2int(x); | 401 return dll_rb_fix2int(x); |
396 } | 402 } |
397 long rb_num2int_stub(VALUE x) | 403 long rb_num2int_stub(VALUE x) |