James McCoy wrote:

> On Mon, Apr 13, 2015 at 03:44:54PM +0200, Bram Moolenaar wrote:
> > 
> > I included a few changes that were discussed on the neovim project.
> > I'm sure there are more, but it requires browsing through the issues and
> > locating the relevant ones.  There is a lot of chatter on the issues.
> > Some have already been included.
> 
> Another thing to be aware of is that Neovim has changed some core
> functionality of Vim in ways that will cause problems with Vim if
> patches are naïvely backported.
> 
> One such change that comes to mind is memory allocation.  There are a
> set of functions implemented in Neovim (xmalloc, xrealloc, etc.) which
> exit if memory can't be allocated, rather than propagating the failure
> up to the caller.  For example, their ga_grow uses xrealloc so there's
> never a need to check its return for success, but there is in Vim (which
> might be an issue in 7.4.690).
> 
> I haven't been paying enough attention to Neovim to know what else may
> be relevant for backporting patches, but wanted to raise the issue that
> it isn't necessarily a "simple" task even once it's known that a Neovim
> change applies to Vim.

Yep, we have to look out for differences.  In the recently included
patch I had to change free() to vim_free().  It's not complicated and
in most cases the patch won't apply (well, I couldn't apply any diff
automatically so far).

It's weird to exit when running out of memory, that's not what users
want.  It's easy to accidentally make a Vim script that consumes all
memory.  It's making things easier for developers and worse for users.
Considering there are many more users than developers, that's a bad
choice.

Anyway, sometimes it's suffucient to just see what code to change to fix
a problem.

-- 
System administrators are just like women: You can't live with them and you
can't live without them.

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
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

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui