view src/typemap @ 24988:494112d2aa93 v8.2.3031

patch 8.2.3031: no error if a function name starts with an underscore Commit: https://github.com/vim/vim/commit/22f17a29cd0b0cc3107dc6cd1d96c62eee52a7d9 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Jun 21 20:48:58 2021 +0200 patch 8.2.3031: no error if a function name starts with an underscore Problem: No error if a function name starts with an underscore. (Naohiro Ono) Solution: In Vim9 script disallow a function name starting with an underscore, as is mentioned in the help. (closes #8414)
author Bram Moolenaar <Bram@vim.org>
date Mon, 21 Jun 2021 21:00: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}\")