On 17/03/10 18:15, Bram Moolenaar wrote:

Patch 7.2.400 (after 7.2.387)
Problem:    Dynamic Ruby is not initialised properly for version 1.9.1.
            Ruby cannot create strings from NULL.
Solution:   Cleanup #ifdefs.  Handle NULL like an empty string.  Add
            ruby_init_stack. (Sergey Khorev)
Files:      src/if_ruby.c

After this patch, I get a warning (probably harmless) as follows:

if_ruby.c: In function ‘vim_to_ruby’:
if_ruby.c:726: warning: pointer type mismatch in conditional expression

The relevant hunk is the following:

***************
*** 720,775 ****

       if (tv->v_type == VAR_STRING)
       {
!         result = rb_str_new2((char *)tv->vval.v_string);
       }
       else if (tv->v_type == VAR_NUMBER)
[...]
--- 722,778 ----

       if (tv->v_type == VAR_STRING)
       {
!       result = rb_str_new2((char *)(tv->vval.v_string == NULL
!                                                  ? "" : tv->vval.v_string));
       }
       else if (tv->v_type == VAR_NUMBER)
[...]


Best regards,
Tony.
--
If you wish to live wisely, ignore sayings -- including this one.

--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

Raspunde prin e-mail lui