view src/typemap @ 26254:3a13efec0016 v8.2.3658

patch 8.2.3658: duplicate code in xxd Commit: https://github.com/vim/vim/commit/48608b4a4bfab4b9c0c9199d57b7e876c56db74c Author: DungSaga <dungsaga@users.noreply.github.com> Date: Wed Nov 24 11:18:07 2021 +0000 patch 8.2.3658: duplicate code in xxd Problem: Duplicate code in xxd. Solution: Merge duplicated code. Add more tests. (closes https://github.com/vim/vim/issues/9192)
author Bram Moolenaar <Bram@vim.org>
date Wed, 24 Nov 2021 12:30: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}\")