view src/typemap @ 8346:8fa75a4c39bd v7.4.1465

commit https://github.com/vim/vim/commit/cc7f8be3e0e6c4d902b02052a862e21c3a3fbe22 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Feb 29 22:55:56 2016 +0100 patch 7.4.1465 Problem: Coverity reported possible use of NULL pointer when using buffer output with JSON mode. Solution: Make it actually possible to use JSON mode with a buffer. Re-encode the JSON to append it to the buffer.
author Christian Brabandt <cb@256bit.org>
date Mon, 29 Feb 2016 23:00: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}\")