view src/typemap @ 26472:cc95e10e1cf2 v8.2.3766

patch 8.2.3766: converting a funcref to a string leaves out "g:" Commit: https://github.com/vim/vim/commit/c4ec338fb80ebfb5d631f0718fdd1a1c04d9ed82 Author: Bram Moolenaar <Bram@vim.org> Date: Thu Dec 9 16:40:18 2021 +0000 patch 8.2.3766: converting a funcref to a string leaves out "g:" Problem: Converting a funcref to a string leaves out "g:", causing the meaning of the name depending on the context. Solution: Prepend "g:" for a global function.
author Bram Moolenaar <Bram@vim.org>
date Thu, 09 Dec 2021 17:45: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}\")