]> git.kaiwu.me - njs.git/commit
Fixed njs_buffer_slot().
authorDmitry Volyntsev <xeioex@nginx.com>
Fri, 17 Sep 2021 18:29:40 +0000 (18:29 +0000)
committerDmitry Volyntsev <xeioex@nginx.com>
Fri, 17 Sep 2021 18:29:40 +0000 (18:29 +0000)
commit5279e0e800ef0812b108a75afb460e96f0fc0f98
treed10f37b4cf7b83cca69b0b283f9c56e29a154784
parent35e38061e061e88b3a77a76e3d42bff166f2b051
Fixed njs_buffer_slot().

Previously, njs_buffer_slot() might return NULL value without setting
corresponding exception where user code expects it.

In addition the function is split into two functions.  The internal one
does not set anything to vm->retval.  This function has to be used by
property handlers, because they are expected not to modify vm->retval.
src/njs_buffer.c
src/test/njs_unit_test.c