view src/typemap @ 31443:9ae3720f9bd9 v9.0.1054

patch 9.0.1054: object member can't get type from initializer Commit: https://github.com/vim/vim/commit/74e1274edf632b83d2948a2a2d519589eff52997 Author: Bram Moolenaar <Bram@vim.org> Date: Tue Dec 13 21:14:28 2022 +0000 patch 9.0.1054: object member can't get type from initializer Problem: Object member can't get type from initializer. Solution: If there is no type specified try to use the type of the initializer. Check for a valid type.
author Bram Moolenaar <Bram@vim.org>
date Tue, 13 Dec 2022 22:15:03 +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}\")