Skip to content

Avoid exposure for REnv objects #5945

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, 2023
Merged

Avoid exposure for REnv objects #5945

merged 1 commit into from
Mar 11, 2023

Conversation

dearblue
Copy link
Contributor

@dearblue dearblue commented Mar 5, 2023

The REnv object is difficult to deal with, and it would be ideal if the user did not have to manipulate it directly. In some previous situations, it was necessary to call mrb_env_unshare(), a non-API function, after mrb_load_string() or similar.

With this patch, it is no longer necessary for users to use mrb_env_unshare() directly, as it is now handled internally simply by using the mrb_vm_ci_env_clear() function. Also, mrb_vm_ci_env_set() is demoted from the MRB_API function for the same reason.

ref. commit 1ab3da6

The `REnv` object is difficult to deal with, and it would be ideal if the user did not have to manipulate it directly.
In some previous situations, it was necessary to call `mrb_env_unshare()`, a non-API function, after `mrb_load_string()` or similar.

With this patch, it is no longer necessary for users to use `mrb_env_unshare()` directly, as it is now handled internally simply by using the `mrb_vm_ci_env_clear()` function.
Also, `mrb_vm_ci_env_set()` is demoted from the `MRB_API` function for the same reason.

ref. commit 1ab3da6
@dearblue dearblue requested a review from matz as a code owner March 5, 2023 09:30
@matz matz merged commit 90e53ca into mruby:master Mar 11, 2023
@matz matz mentioned this pull request Mar 11, 2023
@dearblue dearblue deleted the env-internal branch March 14, 2023 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants