view src/typemap @ 24687:0668fe755d2b v8.2.2882

patch 8.2.2882: Vim9: memory leak when lambda has an error Commit: https://github.com/vim/vim/commit/15bbb8f4f38d25d491d7dff83ef0552e2d442d5d Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 24 15:45:29 2021 +0200 patch 8.2.2882: Vim9: memory leak when lambda has an error Problem: Vim9: memory leak when lambda has an error. Solution: Free the list of argument types on failure.
author Bram Moolenaar <Bram@vim.org>
date Mon, 24 May 2021 16:00:04 +0200
parents dec4338a7da2
children
line wrap: on
line source

TYPEMAP
VIWIN	T_VIOBJNOMUNGE
VIBUF	T_VIOBJNOMUNGE

INPUT
T_VIOBJNOMUNGE
	if (sv_isa($arg, \"${ntype}\")) {
	    IV tmp = SvIV((SV*)SvRV($arg));
	    $var = INT2PTR($type, tmp);
	    if (!tmp)
		croak(\"$ntype no longer exists\");
	}
	else
	    croak(\"$var is not of type ${ntype}\")