Patch 7.1.230

0 views
Skip to first unread message

Bram Moolenaar

unread,
Jan 15, 2008, 4:17:14 PM1/15/08
to vim...@vim.org

Patch 7.1.230
Problem: Memory leak when executing SourceCmd autocommands.
Solution: Free the memory. (Dominique Pelle)
Files: src/ex_cmds2.c


*** ../vim-7.1.229/src/ex_cmds2.c Sun Jan 6 20:05:36 2008
--- src/ex_cmds2.c Tue Jan 15 20:41:28 2008
***************
*** 2889,2899 ****
if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
&& apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
FALSE, curbuf))
# ifdef FEAT_EVAL
! return aborting() ? FAIL : OK;
# else
! return OK;
# endif

/* Apply SourcePre autocommands, they may get the file. */
apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
--- 2889,2902 ----
if (has_autocmd(EVENT_SOURCECMD, fname_exp, NULL)
&& apply_autocmds(EVENT_SOURCECMD, fname_exp, fname_exp,
FALSE, curbuf))
+ {
# ifdef FEAT_EVAL
! retval = aborting() ? FAIL : OK;
# else
! retval = OK;
# endif
+ goto theend;
+ }

/* Apply SourcePre autocommands, they may get the file. */
apply_autocmds(EVENT_SOURCEPRE, fname_exp, fname_exp, FALSE, curbuf);
*** ../vim-7.1.229/src/version.c Mon Jan 14 20:11:37 2008
--- src/version.c Tue Jan 15 22:15:03 2008
***************
*** 668,669 ****
--- 668,671 ----
{ /* Add new patch number below this line */
+ /**/
+ 230,
/**/

--
Citizens are not allowed to attend a movie house or theater nor ride in a
public streetcar within at least four hours after eating garlic.
[real standing law in Indiana, United States of America]

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ download, build and distribute -- http://www.A-A-P.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Charles E Campbell Jr

unread,
Jan 15, 2008, 5:17:50 PM1/15/08
to vim...@googlegroups.com
Bram Moolenaar wrote:

Citizens are not allowed to attend a movie house or theater nor ride in a
public streetcar within at least four hours after eating garlic.
[real standing law in Indiana, United States of America]

This one I figured I might be able to check on -- I mean, how often
would "garlic" show up in the lawbooks? As opposed to something like
"assault". Anyway, doing a search at Indiana University's virtual law
library yielded no hits.

Chip Campbell

Richard Hartmann

unread,
Jan 17, 2008, 10:55:39 AM1/17/08
to vim...@googlegroups.com
On Jan 15, 2008 11:17 PM, Charles E Campbell Jr
<drc...@campbellfamily.biz> wrote:


> This one I figured I might be able to check on -- I mean, how often
> would "garlic" show up in the lawbooks? As opposed to something like
> "assault". Anyway, doing a search at Indiana University's virtual law
> library yielded no hits.

Many of those were modified to make them more obscure, thus 'funnier'.

One of them is that, in Germany, you are not allowed to start a car when
someone is lying under it.

The actual law says that you need to ensure that no one can be harmed
by you operating the vehicle before you drive it. This includes lights, brakes
and, of course, human obstacles.

The first version is 'funny', the latter is not, it is just basic common sense.

Along the same lines, it might be that you are not allowed to enter any of
those three crowded places while stinking so bad as to annoy others.
Then someone just picked the most obscure example he could come up
with while drunk and went with that.


Richard

Reply all
Reply to author
Forward
0 new messages