view src/typemap @ 29048:c98fc7a4dde4 v8.2.5046

patch 8.2.5046: vim_regsub() can overwrite the destination Commit: https://github.com/vim/vim/commit/4aaf3e7f4db599932d01d87e5bbcdc342cccee27 Author: Bram Moolenaar <Bram@vim.org> Date: Mon May 30 20:58:55 2022 +0100 patch 8.2.5046: vim_regsub() can overwrite the destination Problem: vim_regsub() can overwrite the destination. Solution: Pass the destination length, give an error when it doesn't fit.
author Bram Moolenaar <Bram@vim.org>
date Mon, 30 May 2022 22: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}\")