bugfix: jerry_get_object_native_pointer: accept NULL for out_native_info_p (#1770)
With the jerry_set_object_native_pointer() the native_info_p is optional, so I think it makes sense that it is optional for the getter as well. JerryScript-DCO-1.0-Signed-off-by: Martijn The martijn.the@intel.com
This commit is contained in:
committed by
László Langó
parent
07c86ece54
commit
1f6b396ebb
@@ -761,6 +761,11 @@ main (void)
|
||||
&& (uintptr_t) ptr == (uintptr_t) 0x0012345678abcdefull
|
||||
&& out_info_p == &JERRY_NATIVE_HANDLE_INFO_FOR_CTYPE (bind2));
|
||||
|
||||
/* Passing NULL for out_info_p is allowed. */
|
||||
is_ok = jerry_get_object_native_pointer (res, &ptr, NULL);
|
||||
TEST_ASSERT (is_ok
|
||||
&& (uintptr_t) ptr == (uintptr_t) 0x0012345678abcdefull);
|
||||
|
||||
jerry_release_value (res);
|
||||
|
||||
/* Test: Throwing exception from native handler. */
|
||||
|
||||
Reference in New Issue
Block a user