view src/typemap @ 33942:3bba09502b8d v9.0.2167

patch 9.0.2167: Vim9: not consistently using :var for declarations Commit: https://github.com/vim/vim/commit/74da0ee0a24799a312a3a8a65858237185ef7a23 Author: Doug Kearns <dougkearns@gmail.com> Date: Thu Dec 14 20:26:26 2023 +0100 patch 9.0.2167: Vim9: not consistently using :var for declarations Problem: Vim9-script object/class variable declarations use syntax that is inconsistent with the rest of the language. Solution: Use :var to declare object and class variables. closes: #13670 Signed-off-by: Doug Kearns <dougkearns@gmail.com> Signed-off-by: Christian Brabandt <cb@256bit.org>
author Christian Brabandt <cb@256bit.org>
date Thu, 14 Dec 2023 20:30:06 +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}\")