view src/typemap @ 26230:8b8470b511f5 v8.2.3646

patch 8.2.3646: using <sfile> in a function gives an unexpected result Commit: https://github.com/vim/vim/commit/c449271f4efa44725c40116a95b213813040312f Author: Bram Moolenaar <Bram@vim.org> Date: Mon Nov 22 15:37:15 2021 +0000 patch 8.2.3646: using <sfile> in a function gives an unexpected result Problem: Using <sfile> in a function gives an unexpected result. Solution: Give an error in a Vim9 function. (issue https://github.com/vim/vim/issues/9189)
author Bram Moolenaar <Bram@vim.org>
date Mon, 22 Nov 2021 16: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}\")