aboutsummaryrefslogtreecommitdiff
path: root/jerry-ext/arg/arg-transform-functions.c
diff options
context:
space:
mode:
authorRobert Fancsik <frobert@inf.u-szeged.hu>2019-04-16 07:50:49 +0200
committerLászló Langó <llango.u-szeged@partner.samsung.com>2019-04-16 07:50:49 +0200
commitb3f4aa6816be859194d08ac1dd81f278d39b81e7 (patch)
treee71c8f395dabce04ddd5928ac0b6a1338d4bca31 /jerry-ext/arg/arg-transform-functions.c
parentc818930cdc2ee0e8c66acd5566c1b1e4ef6b5e31 (diff)
Allow the JS objects to have more than one native pointer data (#2814)
Currently JS objects can only have one native pointer data which could be a limitation in special cases. This patch allows to register multiple native infos, which can be accessed/associated with the corresponding `jerry_object_native_info_t`. JerryScript-DCO-1.0-Signed-off-by: Robert Fancsik frobert@inf.u-szeged.hu
Diffstat (limited to 'jerry-ext/arg/arg-transform-functions.c')
-rw-r--r--jerry-ext/arg/arg-transform-functions.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/jerry-ext/arg/arg-transform-functions.c b/jerry-ext/arg/arg-transform-functions.c
index 64edf2d0..6c5132d8 100644
--- a/jerry-ext/arg/arg-transform-functions.c
+++ b/jerry-ext/arg/arg-transform-functions.c
@@ -455,12 +455,11 @@ jerryx_arg_transform_native_pointer (jerryx_arg_js_iterator_t *js_arg_iter_p, /*
}
const jerry_object_native_info_t *expected_info_p;
- const jerry_object_native_info_t *out_info_p;
expected_info_p = (const jerry_object_native_info_t *) c_arg_p->extra_info;
void **ptr_p = (void **) c_arg_p->dest;
- bool is_ok = jerry_get_object_native_pointer (js_arg, ptr_p, &out_info_p);
+ bool is_ok = jerry_get_object_native_pointer (js_arg, ptr_p, expected_info_p);
- if (!is_ok || out_info_p != expected_info_p)
+ if (!is_ok)
{
return jerry_create_error (JERRY_ERROR_TYPE,
(jerry_char_t *) "The object has no native pointer or type does not match.");