Skip to content

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

Merged
merged 1 commit into from
Mar 11, 2016

Conversation

franc0is
Copy link
Contributor

@franc0is franc0is commented Mar 8, 2016

JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com

@@ -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
*/
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing @return ... comment

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added.

@LaszloLango
Copy link
Contributor

Besides that missing comment the patch looks good.

@LaszloLango LaszloLango added api Related to the public API development Feature implementation labels Mar 9, 2016

if (value_p->type == JERRY_API_DATA_TYPE_STRING)
{
jerry_api_acquire_string (value_p->u.v_string);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missing return statement

Copy link
Contributor Author

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.

@franc0is
Copy link
Contributor Author

franc0is commented Mar 9, 2016

Will squash the commits after approval. squashed.

@franc0is franc0is force-pushed the acquire-value branch 2 times, most recently from 0a1f1b2 to b80b860 Compare March 10, 2016 23:28
@LaszloLango
Copy link
Contributor

@franc0is, thank you for the updates. LGTM

@zherczeg
Copy link
Member

LGTM.

I would like to (probably will) rename these acquire / release stuff to ref / deref (just a heads up).

@akosthekiss
Copy link
Member

(Once rebased, we can/will land it.)

JerryScript-DCO-1.0-Signed-off-by: François Baldassari francois@pebble.com
@franc0is
Copy link
Contributor Author

rebased

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api Related to the public API development Feature implementation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants