Skip to content
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

Add MRB_API delcaration for mrb_num_div(). #2578

Closed
wants to merge 1 commit into from
Closed

Add MRB_API delcaration for mrb_num_div(). #2578

wants to merge 1 commit into from

Conversation

cubicdaiya
Copy link
Contributor

No description provided.

@matz
Copy link
Member

matz commented Aug 30, 2014

Is there any reason for you to use mrb_num_div() from outside of the core (and gems)?

@cubicdaiya
Copy link
Contributor Author

It might not any reason for use it. But as there is a mismatch between declaration and definition of mrb_num_div(), I think we should make a signature of declaration and definition of mrb_num_div() same.

If mrb_num_div is not assumed to use from outside of the core (and gems),
I think we might apply the following change.

diff --git a/src/numeric.c b/src/numeric.c
index 5cf85fc..da15c92 100644
--- a/src/numeric.c
+++ b/src/numeric.c
@@ -75,7 +75,7 @@ num_pow(mrb_state *mrb, mrb_value x)
  * result.
  */

-MRB_API mrb_value
+mrb_value
 mrb_num_div(mrb_state *mrb, mrb_value x, mrb_value y)
 {
   return mrb_float_value(mrb, mrb_to_flo(mrb, x) / mrb_to_flo(mrb, y));

Or we might remove mrb_num_div() self because mrb_num_div() is not used in mruby now.

@matz
Copy link
Member

matz commented Aug 30, 2014

That way sounds better for me.

@matz matz closed this in 296b057 Aug 30, 2014
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.

None yet

2 participants