-
Notifications
You must be signed in to change notification settings - Fork 683
Add acquire_value API to simplify caller code #944
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@@ -635,6 +635,24 @@ jerry_api_release_object (jerry_api_object_t *object_p) /**< pointer acquired th | |||
} /* jerry_api_release_object */ | |||
|
|||
/** | |||
* Acquire specified Jerry API value | |||
*/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing @return ...
comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added.
Besides that missing comment the patch looks good. |
|
||
if (value_p->type == JERRY_API_DATA_TYPE_STRING) | ||
{ | ||
jerry_api_acquire_string (value_p->u.v_string); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing return
statement
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duh. Sorry for the silly mistake. Added the return statement at the bottom of the function.
|
0a1f1b2
to
b80b860
Compare
@franc0is, thank you for the updates. LGTM |
LGTM. I would like to (probably will) rename these acquire / release stuff to ref / deref (just a heads up). |
(Once rebased, we can/will land it.) |
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
rebased |
JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com