Add info to external pointer free callback. (#4642)
Furthermore reduce memory consumption when only one external pointer is assigned to an object. JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
@@ -132,9 +132,11 @@ test_internal_prop (void)
|
||||
|
||||
static int test_data = 1;
|
||||
|
||||
static void free_test_data (void *data_p)
|
||||
static void free_test_data (void *native_p, /**< native pointer */
|
||||
jerry_object_native_info_t *info_p) /**< native info */
|
||||
{
|
||||
TEST_ASSERT ((int *) data_p == &test_data);
|
||||
TEST_ASSERT ((int *) native_p == &test_data);
|
||||
TEST_ASSERT (info_p->free_cb == free_test_data);
|
||||
} /* free_test_data */
|
||||
|
||||
static const jerry_object_native_info_t test_info =
|
||||
|
||||
Reference in New Issue
Block a user