view src/typemap @ 29724:66f9877b8aab v9.0.0202

patch 9.0.0202: code and help for indexof() is not ideal Commit: https://github.com/vim/vim/commit/3fbf6cd355de2212e9227f57d545592aae3f688f Author: Yegappan Lakshmanan <yegappan@yahoo.com> Date: Sat Aug 13 21:35:13 2022 +0100 patch 9.0.0202: code and help for indexof() is not ideal Problem: Code and help for indexof() is not ideal. Solution: Refactor the code, improve the help. (Yegappan Lakshmanan, closes #10908)
author Bram Moolenaar <Bram@vim.org>
date Sat, 13 Aug 2022 22:45:03 +0200
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}\")