view src/typemap @ 19057:463b6fad54e9 v8.2.0089

patch 8.2.0089: crash when running out of memory in :setfiletype completion Commit: https://github.com/vim/vim/commit/f0f8055102c264b1d0c0a79bf742dc126fb447b9 Author: Bram Moolenaar <Bram@vim.org> Date: Sun Jan 5 22:05:49 2020 +0100 patch 8.2.0089: crash when running out of memory in :setfiletype completion Problem: Crash when running out of memory in :setfiletype completion. Solution: Do not allocate memory. (Dominique Pelle, closes https://github.com/vim/vim/issues/5438)
author Bram Moolenaar <Bram@vim.org>
date Sun, 05 Jan 2020 22:15:33 +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}\")