On 21/03/10 00:28, Bram Moolenaar wrote:
Tony Mechelynck wrote:
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 =91vim_to_ruby=92:
if_ruby.c:726: warning: pointer type mismatch in conditional expression
The relevant hunk is the following:
***************
*** 720,775 ****
if (tv->v_type =3D=3D VAR_STRING)
{
! result =3D rb_str_new2((char *)tv->vval.v_string);
}
else if (tv->v_type =3D=3D VAR_NUMBER)
[...]
--- 722,778 ----
if (tv->v_type =3D=3D VAR_STRING)
{
! result =3D rb_str_new2((char *)(tv->vval.v_string =3D=3D NULL
! ? "" : tv->vval.v_string));
}
else if (tv->v_type =3D=3D VAR_NUMBER)
[...]
I'll fix it. Strange that I missed the warning previously.
Yes, patch 7.2.403 does indeed fix it (for my version if the compiler:
"gcc (SUSE Linux) 4.4.1 [gcc-4_4-branch revision 150839]"). :-)
Best regards,
Tony.
--
GALAHAD: No look, really, this isn't nescess ...
PIGLET: We must examine you.
GALAHAD: There's nothing wrong with ... that.
"Monty Python and the Holy Grail" PYTHON (MONTY)
PICTURES LTD
--
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
To unsubscribe from this group, send email to vim_dev+unsubscribegooglegroups.com or
reply to this email with the words "REMOVE ME" as the subject.