view src/typemap @ 23800:57f0e3fd7c05 v8.2.2441

patch 8.2.2441: Vim9: extend() does not give an error for a type mismatch Commit: https://github.com/vim/vim/commit/c03f5c677a1fba99d2379550ccf2391eaa43e2ac Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 31 17:48:30 2021 +0100 patch 8.2.2441: Vim9: extend() does not give an error for a type mismatch Problem: Vim9: extend() does not give an error for a type mismatch. Solution: Check the type of the second argument. (closes https://github.com/vim/vim/issues/7760)
author Bram Moolenaar <Bram@vim.org>
date Sun, 31 Jan 2021 18:00: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}\")