diff options
author | Bram Moolenaar <Bram@vim.org> | 2013-05-11 17:45:48 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2013-05-11 17:45:48 +0200 |
commit | 76a86063cac601eb393c18664746db263c7b9f19 (patch) | |
tree | 0ba8e91a820ad1b42c50797479ce7f6976da6a3a /src/if_ruby.c | |
parent | 82e803b0559410445fbc90964897953e1f9eb001 (diff) | |
download | vim-76a86063cac601eb393c18664746db263c7b9f19.zip |
updated for version 7.3.935
Problem: Init stack works differently on 64 bit systems.
Solution: Handle 64 bit systems and also static library. (Yukihiro
Nakadaira)
Diffstat (limited to 'src/if_ruby.c')
-rw-r--r-- | src/if_ruby.c | 20 |
1 files changed, 17 insertions, 3 deletions
diff --git a/src/if_ruby.c b/src/if_ruby.c index f1752f047..80aedf798 100644 --- a/src/if_ruby.c +++ b/src/if_ruby.c @@ -227,7 +227,13 @@ static void ruby_vim_init(void); # define rb_float_new dll_rb_float_new # define rb_ary_new dll_rb_ary_new # define rb_ary_push dll_rb_ary_push -# define ruby_init_stack dll_ruby_init_stack +# ifdef __ia64 +# define rb_ia64_bsp dll_rb_ia64_bsp +# undef ruby_init_stack +# define ruby_init_stack(addr) dll_ruby_init_stack((addr), rb_ia64_bsp()) +# else +# define ruby_init_stack dll_ruby_init_stack +# endif #else # define rb_str2cstr dll_rb_str2cstr #endif @@ -336,7 +342,12 @@ static char * (*dll_rb_string_value_ptr) (volatile VALUE*); static VALUE (*dll_rb_float_new) (double); static VALUE (*dll_rb_ary_new) (void); static VALUE (*dll_rb_ary_push) (VALUE, VALUE); -static void (*ruby_init_stack)(VALUE*); +# ifdef __ia64 +static void * (*dll_rb_ia64_bsp) (void); +static void (*dll_ruby_init_stack)(VALUE*, void*); +# else +static void (*dll_ruby_init_stack)(VALUE*); +# endif #endif #ifdef RUBY19_OR_LATER static VALUE (*dll_rb_int2big)(SIGNED_VALUE); @@ -476,6 +487,9 @@ static struct #endif #if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 {"rb_string_value_ptr", (RUBY_PROC*)&dll_rb_string_value_ptr}, +# ifdef __ia64 + {"rb_ia64_bsp", (RUBY_PROC*)&dll_rb_ia64_bsp}, +# endif {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack}, # if DYNAMIC_RUBY_VER <= 19 {"rb_float_new", (RUBY_PROC*)&dll_rb_float_new}, @@ -717,7 +731,7 @@ static int ensure_ruby_initialized(void) NtInitialize(&argc, &argv); #endif { -#if defined(DYNAMIC_RUBY_VER) && DYNAMIC_RUBY_VER >= 18 +#if defined(RUBY_VERSION) && RUBY_VERSION >= 18 ruby_init_stack(ruby_stack_start); #endif ruby_init(); |