view src/typemap @ 23295:d9ae7dd3a0f2 v8.2.2193

patch 8.2.2193: Vim9: can change constant in :def function Commit: https://github.com/vim/vim/commit/3bdc90b7dfab314768a8f56454ea62929524f05c Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 22 20:35:40 2020 +0100 patch 8.2.2193: Vim9: can change constant in :def function Problem: Vim9: can change constant in :def function. Solution: Check if a variable is locked. (issue https://github.com/vim/vim/issues/7526)
author Bram Moolenaar <Bram@vim.org>
date Tue, 22 Dec 2020 20:45:04 +0100
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}\")