view src/typemap @ 32078:615964c77be3 v9.0.1370

patch 9.0.1370: crash when using a NULL object Commit: https://github.com/vim/vim/commit/c3f971f28989fde7d94b45957496fecd6e6f2177 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Mar 2 17:38:33 2023 +0000 patch 9.0.1370: crash when using a NULL object Problem: Crash when using a NULL object. (Ernie Rael) Solution: Check for NULL and give an error message. (closes https://github.com/vim/vim/issues/12083)
author Bram Moolenaar <Bram@vim.org>
date Thu, 02 Mar 2023 18:45:08 +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}\")