home *** CD-ROM | disk | FTP | other *** search
/ vim.ftp.fu-berlin.de / 2015-02-03.vim.ftp.fu-berlin.de.tar / vim.ftp.fu-berlin.de / patches / 7.3 / 7.3.088 < prev    next >
Encoding:
Internet Message Format  |  2012-11-20  |  4.8 KB

  1. To: vim_dev@googlegroups.com
  2. Subject: Patch 7.3.088
  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.3.088
  11. Problem:    Ruby can't load Gems sometimes, may cause a crash.
  12. Solution:   Undefine off_t.  Use ruby_process_options(). (Yasuhiro Matsumoto)
  13. Files:        src/if_ruby.c
  14.  
  15.  
  16. *** ../vim-7.3.087/src/if_ruby.c    2010-12-08 13:11:15.000000000 +0100
  17. --- src/if_ruby.c    2010-12-24 12:18:31.000000000 +0100
  18. ***************
  19. *** 90,95 ****
  20. --- 90,96 ----
  21.   # include <ruby/encoding.h>
  22.   #endif
  23.   
  24. + #undef off_t    /* ruby defines off_t as _int64, Mingw uses long */
  25.   #undef EXTERN
  26.   #undef _
  27.   
  28. ***************
  29. *** 229,238 ****
  30.   # define rb_enc_find_index        dll_rb_enc_find_index
  31.   # define rb_enc_find            dll_rb_enc_find
  32.   # define rb_enc_str_new            dll_rb_enc_str_new
  33. - # define rb_intern2            dll_rb_intern2
  34. - # define rb_const_remove        dll_rb_const_remove
  35.   # define rb_sprintf            dll_rb_sprintf
  36.   # define ruby_init_stack        dll_ruby_init_stack
  37.   #endif
  38.   
  39.   /*
  40. --- 230,239 ----
  41.   # define rb_enc_find_index        dll_rb_enc_find_index
  42.   # define rb_enc_find            dll_rb_enc_find
  43.   # define rb_enc_str_new            dll_rb_enc_str_new
  44.   # define rb_sprintf            dll_rb_sprintf
  45. + # define rb_require            dll_rb_require
  46.   # define ruby_init_stack        dll_ruby_init_stack
  47. + # define ruby_process_options        dll_ruby_process_options
  48.   #endif
  49.   
  50.   /*
  51. ***************
  52. *** 319,329 ****
  53.   static int (*dll_rb_enc_find_index) (const char*);
  54.   static rb_encoding* (*dll_rb_enc_find) (const char*);
  55.   static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*);
  56. - static ID (*dll_rb_intern2) (const char*, long);
  57. - static void (*dll_Init_prelude) (void);
  58. - static VALUE (*dll_rb_const_remove) (VALUE, ID);
  59.   static VALUE (*dll_rb_sprintf) (const char*, ...);
  60.   static void (*ruby_init_stack)(VALUE*);
  61.   #endif
  62.   
  63.   #ifdef RUBY19_OR_LATER
  64. --- 320,329 ----
  65.   static int (*dll_rb_enc_find_index) (const char*);
  66.   static rb_encoding* (*dll_rb_enc_find) (const char*);
  67.   static VALUE (*dll_rb_enc_str_new) (const char*, long, rb_encoding*);
  68.   static VALUE (*dll_rb_sprintf) (const char*, ...);
  69. + static VALUE (*dll_rb_require) (const char*);
  70.   static void (*ruby_init_stack)(VALUE*);
  71. + static void* (*ruby_process_options)(int, char**);
  72.   #endif
  73.   
  74.   #ifdef RUBY19_OR_LATER
  75. ***************
  76. *** 430,439 ****
  77.       {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
  78.       {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find},
  79.       {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new},
  80. -     {"rb_intern2", (RUBY_PROC*)&dll_rb_intern2},
  81. -     {"rb_const_remove", (RUBY_PROC*)&dll_rb_const_remove},
  82.       {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
  83.       {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
  84.   #endif
  85.       {"", NULL},
  86.   };
  87. --- 430,439 ----
  88.       {"rb_enc_find_index", (RUBY_PROC*)&dll_rb_enc_find_index},
  89.       {"rb_enc_find", (RUBY_PROC*)&dll_rb_enc_find},
  90.       {"rb_enc_str_new", (RUBY_PROC*)&dll_rb_enc_str_new},
  91.       {"rb_sprintf", (RUBY_PROC*)&dll_rb_sprintf},
  92. +     {"rb_require", (RUBY_PROC*)&dll_rb_require},
  93.       {"ruby_init_stack", (RUBY_PROC*)&dll_ruby_init_stack},
  94. +     {"ruby_process_options", (RUBY_PROC*)&dll_ruby_process_options},
  95.   #endif
  96.       {"", NULL},
  97.   };
  98. ***************
  99. *** 663,680 ****
  100.           ruby_init();
  101.           }
  102.   #ifdef RUBY19_OR_LATER
  103.           ruby_script("vim-ruby");
  104. ! #endif
  105.           ruby_init_loadpath();
  106. -         ruby_io_init();
  107. - #ifdef RUBY19_OR_LATER
  108. -         rb_enc_find_index("encdb");
  109. -         /* This avoids the error "Encoding::ConverterNotFoundError: code
  110. -          * converter not found (UTF-16LE to ASCII-8BIT)". */
  111. -         rb_define_module("Gem");
  112. -         rb_const_remove(rb_cObject, rb_intern2("TMP_RUBY_PREFIX", 15));
  113.   #endif
  114.           ruby_vim_init();
  115.           ruby_initialized = 1;
  116.   #ifdef DYNAMIC_RUBY
  117. --- 663,678 ----
  118.           ruby_init();
  119.           }
  120.   #ifdef RUBY19_OR_LATER
  121. +         {
  122. +         int dummy_argc = 2;
  123. +         char *dummy_argv[] = {"vim-ruby", "-e0"};
  124. +         ruby_process_options(dummy_argc, dummy_argv);
  125. +         }
  126.           ruby_script("vim-ruby");
  127. ! #else
  128.           ruby_init_loadpath();
  129.   #endif
  130. +         ruby_io_init();
  131.           ruby_vim_init();
  132.           ruby_initialized = 1;
  133.   #ifdef DYNAMIC_RUBY
  134. *** ../vim-7.3.087/src/version.c    2010-12-17 20:23:56.000000000 +0100
  135. --- src/version.c    2010-12-24 13:38:51.000000000 +0100
  136. ***************
  137. *** 716,717 ****
  138. --- 716,719 ----
  139.   {   /* Add new patch number below this line */
  140. + /**/
  141. +     88,
  142.   /**/
  143.  
  144. -- 
  145. It is hard to understand how a cemetery raised its burial
  146. cost and blamed it on the cost of living.
  147.  
  148.  /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
  149. ///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
  150. \\\  an exciting new programming language -- http://www.Zimbu.org        ///
  151.  \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///
  152.